Plots icon indicating copy to clipboard operation
Plots copied to clipboard

some strings are not translatable

Open mskf1383 opened this issue 1 year ago • 2 comments

Hi The Persian translation is compeleted, but some strings in "help" are English: نماگرفت_۲۰۲۳۰۶۲۹_۱۷۲۹۳۰

mskf1383 avatar Jun 29 '23 14:06 mskf1383

Thanks, I hadn't noticed this problem. I don't think Weblate is really designed to translate the help files, and it doesn't seem to detect all the strings in the help files.

If you want, you can edit the relevant help files manually at https://github.com/alexhuntley/Plots/tree/main/help/fa

alexhuntley avatar Jul 31 '23 17:07 alexhuntley

Hi @alexhuntley,

I've noticed that your translation implementation differs significantly from other GNOME apps. While I'm not a developer, I've observed that typical GNOME apps:

  • Create a POTFILES in the po folder, as seen here: https://github.com/rafaelmardojai/blanket/blob/master/po/POTFILES
  • List related files to extract strings with Gettext.
  • Generate a POT file using the following command: xgettext --files-from=inputFile --output=outputFile --from-code=UTF-8 --add-comments

This way, translators don't directly modify appdata or metadata files.

Handling desktop and metadata files

  • Create desktop and appdata files as templates, similar to the approach in the Blanket project: https://github.com/rafaelmardojai/blanket/tree/master/data
  • Utilize Meson to generate the actual files from templates: https://github.com/rafaelmardojai/blanket/blob/master/data/meson.build

Managing help documents

You can adopt a similar approach from Simple Scan: https://gitlab.gnome.org/GNOME/simple-scan/-/tree/master/help

This methodology ensures a consistent translation process across GNOME applications.

Best regards

ghost avatar Dec 31 '23 19:12 ghost