Menu

#1106 Remove programing logic fro translation files

3.0 Alpha Series
open
nobody
None
5
2014-10-30
2014-10-28
GunChleoc
No

When translating lang files, translators like to use tools like Transifex to help them see source and target language side by side. These tools are also very valuable when dealing with updates in the source language.

However, NSIS translation files have programming logic in them. It is generally not a good idea to force people who aren't coders to code, because Bad Things Happen.

Specifically, we have an identical variable being assigned different values in a conditional statement, which makes it impossible for Transifex to deal properly with the file - one of the translations always gets erased, without the translator even noticing that this has happened.

Discussion

  • Anders

    Anders - 2014-10-28

    Are you talking about !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE?

     
  • GunChleoc

    GunChleoc - 2014-10-29

    Yes, I think that
    's the worst offende, because it creates 2 different versions of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO

    One of the projects that I translated also said that they couldn't include the gd locale in the installer because it created a Macro error. I have asked if they have a concrete error message for me.

    Generally, it would be good not to have the !insertmacro or any !ifdef/!ifndef in there

     
    • Anders

      Anders - 2014-10-29

      Most of them like !ifdef MUI_COMPONENTSPAGE will probably have to stay.

      NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE could probably be changed a little bit:

      !ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
        ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Description"
        !define MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO_MOUSE "Position your mouse over a component to see its description."
        !define MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO_SELECT "Select a component to see its description."
        !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
          ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "${MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO_MOUSE}"
        !else
          ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "${MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO_SELECT}"
        !endif
        !undef MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO_MOUSE
        !undef MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO_SELECT
      !endif
      

      ...but is this enough to actually help?

      Or something like this?

      ${LangFileStringDefSel} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE "Select a component to see its description." "Position your mouse over a component to see its description."
      
       
  • GunChleoc

    GunChleoc - 2014-10-30

    I think the first option would be more helpful to translators, because each translation will be a separate variable. It would also make it easier to port the already existing translations.

     

Log in to post a comment.