Closes #42
Add i18n #43
x1z53/satellite:i18n-init into main
It would look easier if Meson was used. However, I decided that it was not worth interfering with the infrastructure of the project
@ -0,0 +26,4 @@
#: satellite/application.py:227
msgid "Do you want to stop recording a track?"
msgstr "Вы точно хотите остановить запись трека?"
Маршрута
@ -0,0 +90,4 @@
#: satellite/application.py:421
msgid "Active / in use sats"
msgstr "Активные / используемые показатели"
Спутники
@ -0,0 +94,4 @@
#: satellite/application.py:422
msgid "Receiving sats"
msgstr "Получение показателей"
Принимаемые спутники
@ -0,0 +98,4 @@
#: satellite/application.py:424
msgid "Visible sats"
msgstr "Отображаемые показатели"
Видимые спутники
@ -0,0 +102,4 @@
#: satellite/application.py:426
msgid "Age of update / fix"
msgstr "Срок действия обновления / фиксации"
Срок обновления / фиксации
@ -0,0 +106,4 @@
#: satellite/application.py:427
msgid "System time"
msgstr "Системное время"
Тут, судя по коду, имеется в виду время в спутниковой системе.
Предлагаю "Спутниковое время"
This really is system time, that is, the output of datetime.now() when the NMEA output is parsed. There's probably a reason for using this instead of the time parsed from NMEAs, but I can't recall it just now :)
@tpikonen wrote in #43 (comment):
This really is system time, that is, the output of
datetime.now()when the NMEA output is parsed. There's probably a reason for using this instead of the time parsed from NMEAs, but I can't recall it just now :)
So just return "Системное время"?
So just return "Системное время"?
Yes.
This should still be fixed, I can address the rest of the remaining issues myself, since the code needs some tweaks to work with the supported installation methods anyway.
@ -0,0 +146,4 @@
#: satellite/application.py:510
msgid "Modem error: "
msgstr "Ошибка модема"
Двоеточие и пробел
msgstr "Ошибка модема: "
@ -0,0 +170,4 @@
#: satellite/menus.blp:13
msgid "Record track"
msgstr "Записать трек"
Записать маршрут
Looks good to me 👍
Thanks, looks good, except for the System time translation. And please squash the fixed ru translation into one commit.
I have to test the dataframe title wrap a bit, but it's probably OK.
@x1z53 wrote in #43 (comment):
It would look easier if Meson was used. However, I decided that it was not worth interfering with the infrastructure of the project
I've tried to keep this project build-system free, but failed, since there is a Makefile for the blueprint to ui generation.
The de-facto build system we use is pip, I'll have to see if how it works with translations.
b9d28856df
to 1283bf4bcd
@x1z53 In satellite.desktop you might want to add a Comment[ru]= pair.
In theory even the GenericName and the Name key could be localized.
See Key with localestring for Value Type, and key localizations.
The appdata.xml, should probably also have localized tags for at least.name,summary, image, caption and description.
I am not sure about developer, last time I have checked, the latin personal names were also Cyrillised in Russia so I am guessing that one as well.
@ -0,0 +11,4 @@
- Commit your changes with message `chore(i18n/<LANG>): update`
- Where `<LANG>` is target locale
- Replace `update` with `init` in the message if you initiate a new translation
We're not using semantic commit messages in this project, so the commit message for translations should be something like i18n: Add / update <language> translation. (You don't need to change the commit messages in this MR though)
@x1z53, since you obviously made some testing, how did you install and run this?
I would like to support pipx and pip installs and running from the source directory with translations. This works when adding the expected path manually as a second arg to gettext.bindtextdomain(), but maybe there is a better way?
Also, for testing, it would be useful to build and install the the .mo files under ./locale in the source tree without installing the rest of the package. Is there a way to do this with setuptools-gettext? If there is, it should be added to the translation docs.
@tpikonen wrote in #43 (comment):
how did you install and run this?
> sudo python3 -m pyproject_installer -v build
> sudo python3 -m pyproject_installer -v install
> satellite
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?