Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qt source code doesn't contain numerus info for the Lojban language #1642

Open
vedgy opened this issue May 16, 2023 · 5 comments · May be fixed by #1651
Open

Qt source code doesn't contain numerus info for the Lojban language #1642

vedgy opened this issue May 16, 2023 · 5 comments · May be fixed by #1651

Comments

@vedgy
Copy link
Member

vedgy commented May 16, 2023

When I run the command lupdate goldendict.pro, the following warning appears in the output:

File /path/to/goldendict/locale/jb_JB.ts won't be updated: it contains translation but the target language is not recognized

Neither renaming the file to e.g. jbo_IN.ts nor setting the language attribute of the TS element to say "jbo" allows to update this .ts file.

The issue was introduced in Qt 5.13 and cherry-picked into Qt 5.12.4: https://codereview.qt-project.org/c/qt/qttools/+/255003. The relevant Qt Linguist code: https://codebrowser.dev/qt5/qttools/src/linguist/lupdate/main.cpp.html#371. The .ts file is not updated, because the Lojban language is absent from numerusTable. The Lojban language is also absent from Qt6's numerusTable.

A workaround is to set the language attribute of the TS element to a supported language code, e.g. "en", but then plural translations could be broken. Does GoldenDict even contain plural translations?

@Abs62, do you update the ts files using an older version of lupdate unaffected by this issue?

@robintown, do you know which numerusTable entry is suitable for the Lojban language? We could work around the issue by setting the wrong language attribute value in jb_JB.ts permanently or only before running lupdate (then revert to jb or jbo). But the language information should also be contributed to Qt in order to prevent wrong translation info or a perpetual maintenance burden.

@Abs62
Copy link
Member

Abs62 commented May 16, 2023

do you update the ts files using an older version of lupdate unaffected by this issue?

I use lupdate from Qt4 as a rule.

@robintown
Copy link
Contributor

I believe the right table entry would be the first one (Japanese style, nplurals=1; plural=0;). However I added that translation just for fun as a project a few years ago and I don't believe anyone's been using it since then, so if it's making life difficult for you all, don't hesitate to remove it.

@vedgy
Copy link
Member Author

vedgy commented Jun 3, 2023

I believe the right table entry would be the first one (Japanese style, nplurals=1; plural=0;).

If I understand correctly nplurals=1 means no distinction between between singular and plural form of a word. But Lojban grammar appears to append s to the plural form of a word. This leaves a few choices depending on how "zero" multiplicity is treated in Lojban: same as "two" (English-style), same as "one", or a category of its own.

However I added that translation just for fun as a project a few years ago and I don't believe anyone's been using it since then, so if it's making life difficult for you all, don't hesitate to remove it.

If this translation is not very important, I suppose we'll eventually set the wrong (but best-fit) language attribute value in jb_JB.ts permanently to avoid any maintenance overhead.

@robintown
Copy link
Contributor

No, words in Lojban do not actually have a separate plural form. The page you found is misleading, it appears to be from an unfinished series of lessons that were copied directly from a Spanish course, with only the first two pages in the series having been changed to feature Lojban rather than Spanish. For example "le kabri" would be translated as either "the cup" or "the cups" depending on context.

vedgy added a commit to vedgy/goldendict that referenced this issue Jun 5, 2023
This commit eliminates the following warning in the output of command
`lupdate goldendict.pro`:
  File /path/to/goldendict/locale/jb_JB.ts won't be updated: it contains
  translation but the target language is not recognized

The issue was introduced in Qt 5.13 and cherry-picked into Qt 5.12.4:
https://codereview.qt-project.org/c/qt/qttools/+/255003

The .ts file is not updated, because the Lojban language is absent from
Qt's numerusTable in qttools/src/linguist/shared/numerus.cpp.

Work the issue around by setting the language attribute of the TS
element to a suitable supported language code "ja" (Japanese). Words in
Lojban do not actually have a separate plural form, like in Japanese. So
this way plural translations should be handled correctly.

Closes goldendict#1642
@vedgy vedgy linked a pull request Jun 5, 2023 that will close this issue
@vedgy
Copy link
Member Author

vedgy commented Jun 5, 2023

Thank you for the explanation. #1651 sets the language attribute value to "ja" (Japanese).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants