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

Translate default German text #459

Open
kelemeng opened this issue Jul 31, 2023 · 3 comments
Open

Translate default German text #459

kelemeng opened this issue Jul 31, 2023 · 3 comments

Comments

@kelemeng
Copy link
Contributor

When the Form sidebar panel is opened in a non-form document, it says "Das Dokument ist kein Formular" - this string should be translated to English and marked for localization (enclosing in L.m() call).
Code pointer:
core/src/main/java/org/libreoffice/lots/form/sidebar/FormSidebarPanel.java:232: XControl label = GuiFactory.createLabel(this.xMCF, this.context, "Das Dokument ist kein Formular.",

@kelemeng
Copy link
Contributor Author

Another instance: Help - About WollMux - the dialog title
code pointer:
core/src/main/java/org/libreoffice/lots/event/handlers/OnAbout.java:69: dialog.setTitle(L.m("Über WollMux"));

@Sreejit-Sengupto
Copy link
Contributor

When the Form sidebar panel is opened in a non-form document, it says "Das Dokument ist kein Formular" - this string should be translated to English and marked for localization (enclosing in L.m() call). Code pointer: core/src/main/java/org/libreoffice/lots/form/sidebar/FormSidebarPanel.java:232: XControl label = GuiFactory.createLabel(this.xMCF, this.context, "Das Dokument ist kein Formular.",

Upon looking at the code I got the idea that L.m() is for translating text. Could you please brief me more about it? And how to use it for fixing this? I see it has multiple function with different parameters?

@smehrbrodt
Copy link
Contributor

Upon looking at the code I got the idea that L.m() is for translating text. Could you please brief me more about it? And how to use it for fixing this? I see it has multiple function with different parameters?

Basically just call L.m("Text you want to translate"). If you need to put variables into the translated text, do it like this:

L.m("Collision while trying to change \"{0}\" to \"{1}\"", id, newID)

You can put up to 4 variables into one string.

Plural forms can be done using L.mn.

Check existing usages in the code, or just ask if you have specific questions.

Translation tooling will pick up all strings in L.m function and handle the rest.

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

No branches or pull requests

3 participants