Are you familiar with gettext and how to use it to create translation catalogs? If not I suggest you familiarize yourself with it first.
An example does not exist yet (the example will be the core extensions shipped with Inkscape). As soon as I get around to create this "example" I'll also write the relevant documentation.
Is it possible to create a translation file for an extension?
It is possible since Inkscape 1.0 but I did not get around to write the documentation for it.
In short, you need to set the
translationdomain
attribute on the root<extension>
element, then Inkscape will look for a gettext translation catalog next to the .inx file of your extension, see https://gitlab.com/inkscape/inkscape/-/merge_requests/976/diffs#e8d978e6d87cf2f09241382e630d1e7249060b1c_428_461Thank's.
But i don't understand how i can use it. What is the ${translationdomain}.mo file and what is the format of translation file (po ?)
Could you help me with an example ?
Are you familiar with gettext and how to use it to create translation catalogs? If not I suggest you familiarize yourself with it first.
An example does not exist yet (the example will be the core extensions shipped with Inkscape). As soon as I get around to create this "example" I'll also write the relevant documentation.
No I'm not. Then i will try it.
Thank's
Hello!
Have you got to create a translation file for an extension, @FrankI4466 ? If so, could you tell us how to?
@Ede_123 , did you write the documentation to see some example?
Thank you in advance
Unfortunetaly, I did not succeed.
I get to translate an extension. I'm going to tell you guys how to i did.
- Add a
translationdomain
attribute to the rootinkscape-extension
element.- Add underscore at the begining of the tag name. Example: <_label> and </_label>
- Text must be in English
- Download .po file from sources https://gitlab.com/inkscape/inkscape/-/tree/master/po and add the translation (english included).
Example in English:
#:
#: .../share/inkscape/extensions/extension/file.inx:line
msgid "Engraving Spedd (mm/min)"
msgstr ""
Example in Spanish:
#:
#: File: ../share/inkscape/extensions/extension/file.inx:line
msgid "Engraving Spedd (mm/min)"
msgstr "Velocidad de grabado (mm/min)"
- Compile to .mo.
- Locate files to \share\locale in every folder. Rename de .mo to inkscape.mo
Note: Inkscape has to be closed to see the changes.
I hope this will be useful
Thank you George. I will try it. But i have read (somewhere ?) that the underscore is not necessary now (since 1.0 version).