2020-07-04 11:25 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001269OTB-Packaging[Orfeo Toolbox (OTB)] Generalpublic2016-10-25 14:36
Reportergpasero 
Assigned Torashadkm 
PrioritynormalSeverityminorReproducibilityalways
StatusassignedResolutionopen 
Summary0001269: No translation when loading Monteverdi.app in MacOSX binary packages
DescriptionWhen I open Monteverdi using the "Monteverdi.app" launcher, the translation is not loaded (french platform).
Howeverdi, when loading Monteverdi from a terminal ( ./bin/monteverdi ), the translation is correctly loaded.
Steps To ReproduceDownload MacOSX 5.6.1 package : OTB-5.6.1-Darwin64.run
Install the package on a platform with french locale.
Open Monteverdi.app
TagsNo tags attached.
Attached Files
  • patch file icon locale.patch (848 bytes) 2016-09-07 16:59 -
    diff --git a/Modules/Visualization/MonteverdiCore/src/mvdI18nCoreApplication.cxx b/Modules/Visualization/MonteverdiCore/src/mvdI18nCoreApplication.cxx
    index 251fa7c..cebfaa5 100644
    --- a/Modules/Visualization/MonteverdiCore/src/mvdI18nCoreApplication.cxx
    +++ b/Modules/Visualization/MonteverdiCore/src/mvdI18nCoreApplication.cxx
    @@ -584,6 +584,15 @@ I18nCoreApplication
       //
       // 1. default UI language is english (no translation).
       QLocale sys_lc( QLocale::system() );
    +
    +  // Trace system locale.
    +  qWarning()
    +    << "Language:" << QLocale::languageToString( sys_lc.language() );
    +
    +  qWarning()
    +    << "Country:" << QLocale::countryToString( sys_lc.country() );
    +
    +  // Check system locale.
       if( sys_lc.language() == QLocale::C ||
           ( sys_lc.language() == QLocale::English &&
             sys_lc.country() == QLocale::UnitedStates ) )
    
    patch file icon locale.patch (848 bytes) 2016-09-07 16:59 +

-Relationships
+Relationships

-Notes

~0003679

rashadkm (developer)

can you look at env on terminal? for me, i have

...
LANG=en_US.UTF-8
...

~0003680

rashadkm (developer)

the issue comes from export LC_NUMERIC=C

monteverdi.app is simple a wrapper for running ./bin/monteverdi with some environment variables set
here is the contents of script in Monteverdi.app which is written when running .run file.

#!/usr/bin/env bash
export LC_NUMERIC=C
export OTB_APPLICATION_PATH=/Users/otbval/OTB-5.6.1-Darwin64/lib/otb/applications
export GDAL_DATA=/Users/otbval/OTB-5.6.1-Darwin64/share/gdal
export GEOTIFF_CSV=/Users/otbval/OTB-5.6.1-Darwin64/share/epsg_csv
/Users/otbval/OTB-5.6.1-Darwin64/bin/monteverdi "$@"

If you simply copy-paste this to terminal. the language is english on a french system.

if you didn't set export LC_NUMERIC=C then you get a french locale depending on the system locale.

Wondering why LC_NUMERIC is affecting the whole language in Mac OSX.

Did they really changed it?

~0003698

salbert (developer)

I added a small patch which traces the QLocale::system().language() and .country() strings detected by Qt [1]

[1] http://git.orfeo-toolbox.org/otb.git/commit/507cee3c10c97ddab3b4c0c414c0d76564f31393

~0003827

rashadkm (developer)

the issue is from mac osx taking LC_NUMERIC and setting that as language which is incorrect.

could we force LC_NUMERIC=C only when reading/writing data?
+Notes

-Issue History
Date Modified Username Field Change
2016-08-29 11:37 gpasero New Issue
2016-08-29 16:54 rashadkm Assigned To => rashadkm
2016-08-29 16:54 rashadkm Status new => assigned
2016-09-02 10:26 rashadkm Note Added: 0003679
2016-09-02 10:53 rashadkm Note Added: 0003680
2016-09-07 16:59 salbert Note Added: 0003698
2016-09-07 16:59 salbert File Added: locale.patch
2016-10-25 14:36 rashadkm Note Added: 0003827
+Issue History