5
18
Fork
You've already forked satellite
3

Add i18n #43

Open
x1z53 wants to merge 9 commits from x1z53/satellite:i18n-init into main
pull from: x1z53/satellite:i18n-init
merge into: tpikonen:main
tpikonen:main
First-time contributor
Copy link

Closes #42

Closes #42
Author
First-time contributor
Copy link

It would look easier if Meson was used. However, I decided that it was not worth interfering with the infrastructure of the project

It would look easier if Meson was used. However, I decided that it was not worth interfering with the infrastructure of the project
Author
First-time contributor
Copy link
![изображение](/attachments/328fe3d7-ad7a-4128-bd16-37e48d1dfedf) ![изображение](/attachments/9510a0f3-35f6-4b58-a96b-fbbe4985c850)
NekoCWD requested changes 2026年05月11日 12:11:25 +02:00
Dismissed
po/ru.po Outdated
@ -0,0 +26,4 @@
#: satellite/application.py:227
msgid "Do you want to stop recording a track?"
msgstr "Вы точно хотите остановить запись трека?"
First-time contributor
Copy link

Маршрута

Маршрута
x1z53 marked this conversation as resolved
po/ru.po Outdated
@ -0,0 +90,4 @@
#: satellite/application.py:421
msgid "Active / in use sats"
msgstr "Активные / используемые показатели"
First-time contributor
Copy link

Спутники

Спутники
x1z53 marked this conversation as resolved
po/ru.po Outdated
@ -0,0 +94,4 @@
#: satellite/application.py:422
msgid "Receiving sats"
msgstr "Получение показателей"
First-time contributor
Copy link

Принимаемые спутники

Принимаемые спутники
x1z53 marked this conversation as resolved
po/ru.po Outdated
@ -0,0 +98,4 @@
#: satellite/application.py:424
msgid "Visible sats"
msgstr "Отображаемые показатели"
First-time contributor
Copy link

Видимые спутники

Видимые спутники
x1z53 marked this conversation as resolved
po/ru.po Outdated
@ -0,0 +102,4 @@
#: satellite/application.py:426
msgid "Age of update / fix"
msgstr "Срок действия обновления / фиксации"
First-time contributor
Copy link

Срок обновления / фиксации

Срок обновления / фиксации
x1z53 marked this conversation as resolved
po/ru.po Outdated
@ -0,0 +106,4 @@
#: satellite/application.py:427
msgid "System time"
msgstr "Системное время"
First-time contributor
Copy link

Тут, судя по коду, имеется в виду время в спутниковой системе.
Предлагаю "Спутниковое время"

Тут, судя по коду, имеется в виду время в спутниковой системе. Предлагаю "Спутниковое время"
Owner
Copy link

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 :)

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 :)
Author
First-time contributor
Copy link

@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 "Системное время"?

@tpikonen wrote in https://codeberg.org/tpikonen/satellite/pulls/43#issuecomment-14737764: > 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 "Системное время"?
Owner
Copy link

So just return "Системное время"?

Yes.

> So just return "Системное время"? Yes.
Owner
Copy link

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.

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.
po/ru.po Outdated
@ -0,0 +146,4 @@
#: satellite/application.py:510
msgid "Modem error: "
msgstr "Ошибка модема"
First-time contributor
Copy link

Двоеточие и пробел

msgstr "Ошибка модема: " 
Двоеточие и пробел ``` msgstr "Ошибка модема: " ```
x1z53 marked this conversation as resolved
po/ru.po Outdated
@ -0,0 +170,4 @@
#: satellite/menus.blp:13
msgid "Record track"
msgstr "Записать трек"
First-time contributor
Copy link

Записать маршрут

Записать маршрут
x1z53 marked this conversation as resolved
NekoCWD left a comment
Copy link

Looks good to me 👍

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.

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.

@x1z53 wrote in https://codeberg.org/tpikonen/satellite/pulls/43#issuecomment-14635674: > 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.
Author
First-time contributor
Copy link

@tpikonen wrote in #43 (comment):

And please squash the fixed ru translation into one commit.

DONE

@tpikonen wrote in https://codeberg.org/tpikonen/satellite/pulls/43#issuecomment-14737971: > And please squash the fixed ru translation into one commit. DONE
Contributor
Copy link

@x1z53 In satellite.desktop you might want to add a Comment[ru]= pair.

@x1z53 In [satellite.desktop](https://codeberg.org/tpikonen/satellite/src/branch/main/data/satellite.desktop) you might want to add a `Comment[ru]=` pair.
Contributor
Copy link

In theory even the GenericName and the Name key could be localized.
See Key with localestring for Value Type, and key localizations.

In theory even the `GenericName` and the `Name` key could be localized. [See](https://specifications.freedesktop.org/desktop-entry/latest/recognized-keys.html) `Key` with `localestring` for `Value Type`, and [key localizations](https://specifications.freedesktop.org/desktop-entry/latest/localized-keys.html).
Contributor
Copy link

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.

The [appdata.xml](https://codeberg.org/tpikonen/satellite/src/branch/main/data/page.codeberg.tpikonen.satellite.appdata.xml), should probably also have [localized tags](https://docs.flathub.org/docs/for-app-authors/metainfo-guidelines#metainfo-translations) 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
Owner
Copy link

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)

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.

@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.
Author
First-time contributor
Copy link

@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
@tpikonen wrote in https://codeberg.org/tpikonen/satellite/pulls/43#issuecomment-15003756: > how did you install and run this? ``` > sudo python3 -m pyproject_installer -v build > sudo python3 -m pyproject_installer -v install > satellite ```
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u i18n-init:x1z53-i18n-init
git switch x1z53-i18n-init

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.

git switch main
git merge --no-ff x1z53-i18n-init
git switch x1z53-i18n-init
git rebase main
git switch main
git merge --ff-only x1z53-i18n-init
git switch x1z53-i18n-init
git rebase main
git switch main
git merge --no-ff x1z53-i18n-init
git switch main
git merge --squash x1z53-i18n-init
git switch main
git merge --ff-only x1z53-i18n-init
git switch main
git merge x1z53-i18n-init
git push origin main
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tpikonen/satellite!43
Reference in a new issue
tpikonen/satellite
No description provided.
Delete branch "x1z53/satellite:i18n-init"

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?