Skip to content

Conversation

@nephros
Copy link
Contributor

@nephros nephros commented Nov 5, 2021

Follow-up to PR #153

Up until now there was no .qm file installed for English (only existing -XX.ts files were considered by the build process).
In order to have translations show up we generate and install an -en.qm file, using the translation source as source.

@Olf0
Copy link
Contributor

Olf0 commented Nov 5, 2021

Up until now there was no .qm file installed for English (only existing -XX.ts files were considered by the build process).
In order to have translations show up we generate and install an -en.qm file, using the translation source as source.

Sounds reasonable, though I wonder what "In order to have translations show up [...]" means, because the translations are already working fine AFAICT.
But maybe I am just missing where the translations "show up" with this change.

Edit: Maybe, because of the reference to #153, it means that the "translated" English category names from the TS source file (which are just capitalised) are only displayed as such (capitalised) in Patchmanager with this change?

@nephros
Copy link
Contributor Author

nephros commented Nov 5, 2021

Up until now there was no .qm file installed for English (only existing -XX.ts files were considered by the build process).
In order to have translations show up we generate and install an -en.qm file, using the translation source as source.

Sounds reasonable, though I wonder what "In order to have translations show up [...]" means, because the translations are already working fine AFAICT. But maybe I am just missing where the translations "show up" with this change.

Consider the latest change of "translating" the categories from Cpp files ("homescreen", "other" etc) to their capitalized equivalents.

Those "translations" would not show up for me when testing the list of services list PR #136 in English locale (still the lowercase versions show up).

The reason being, the runtime environment will look for a .qm file containing these translations - but while before this change here the build process did create a .qm file from the settings-patchmanager.ts file, it did not package/install it.

EDIT: re: your Edit: yeah, precisely.

Copy link
Contributor

@Olf0 Olf0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, though I am not fully able to check the correctness of the syntax (i.e., please double-check).

@nephros
Copy link
Contributor Author

nephros commented Nov 5, 2021

Looking good, though I am not fully able to check the correctness of the syntax (i.e., please double-check).

It does what it's supposed to do.
There likely is a way to do this more elegantly, but someone who writes .pro files more often than me is welcome to refactor the whole thing :)

@nephros nephros merged commit 4144b51 into sailfishos-patches:master Nov 5, 2021
@nephros nephros deleted the translate-categories-en-2 branch November 5, 2021 21:06
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 this pull request may close these issues.

2 participants