LibreOffice / lots

Letterhead, template, form, autotext, mail merge,... extension for LibreOffice
https://wollmux.org/
European Union Public License 1.1
53 stars 31 forks source link

Translate default German text #459

Open kelemeng opened 1 year ago

kelemeng commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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.