#524 Incorrect template generated Java files due to whitespaces


Title :
Incorrect template generated Java files due to whitespaces in "untitled" wildcard translation.

Context :
OS : Linux Ubuntu 10.04 (Lucid Lynx)
Geany version : 0.18 (original one from Ubuntu repositories)
Geany (extended) version : geany 0.18 (construit le Aug 24 2009 avec GTK 2.17.7, GLib 2.21.4)

Description :
The problem concerns at least :
- JAVA generated files using templates,
- and FRENCH locale translation of Geany.
It may affect other programming languages and other locale translations.

Example :
With French locale translation, "untitled" wildcard is replaced by "sans titre". So, Java generated files using templates contain a whitespace in their file names "sans titre.java" (and obviously in their class names "sans titre") which is not correct.

Suggested solution :
The suggested solution is to remove any whitespace in locale translations of "untitled" wildcard, and to CamelCase the translation according to removed whitespaces in order to keep a good lisibility.
With this policy, the previous example would give the correct "sansTitre" as the translation of "untitled" instead of the incorrect one "sans titre".

Thank you for Geany ;)


  • Fox

    Fox - 2010-07-16

    Example of template generated Java file which is incorrect because of an annoying whitespace

  • Fox

    Fox - 2010-07-19

    After a quick look of Geany source code... ;)
    It is possible to do that on the fly but an other solution would be to simply avoid whitespaces in static "untitled" translations which can be found in /po/ directory.
    Whitespaces can be replaced with CamelCase style naming as suggested before but it could be more neutral for translators to replace whitespaces " " with underscores "_".

  • Fox

    Fox - 2010-07-21
    • labels: 1385609 --> Translations
  • frlan

    frlan - 2010-07-22

    I disagree to fix this inside the translation files. This should be done IMHO on code level by preventing from strings being marked as translatable.

  • Lex Trotman

    Lex Trotman - 2012-09-13

    Would having a translator comment noting that this is a filename and requesting that it use underscores instead of spaces be acceptable, otherwise the string in Geany.h should be untranslated.

  • Lex Trotman

    Lex Trotman - 2012-09-13
    • status: open --> open-accepted

Log in to post a comment.