calaos / calaos_base

Calaos server
https://calaos.fr
GNU General Public License v3.0
160 stars 37 forks source link

Activate gettext translation at the starting of calaos_server... #140

Closed FragJage closed 6 years ago

FragJage commented 6 years ago

… to have --help and --gendoc in the local language. I'm not sure for the path on bindtextdomain function...

raoulh commented 6 years ago

I would use PACKAGE_DATA_DIR instead of hard coded /usr/... which is wrong.

Also check the log in travis, the build is failing for macos

FragJage commented 6 years ago

PACKAGE_DATA_DIR is set to /usr/local/share/calaos but make install copy translation files (*.po) to /usr/local/share/locale. It's a bug ?

naguirre commented 6 years ago

You should have a PACKAGE_LOCAL_DIR, if it's not the case we need to add it in Makefile.am.

Le 4 oct. 2017 05:56, "François JARRIER-GELLEZ" notifications@github.com a écrit :

PACKAGE_DATA_DIR is set to /usr/local/share/calaos but make install copy translation files (*.po) to /usr/local/share/locale. It's a bug ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/calaos/calaos_base/pull/140#issuecomment-333990946, or mute the thread https://github.com/notifications/unsubscribe-auth/AAoVYhRX14iJaVCVMhy-Zx4-POU-AOp0ks5soq2OgaJpZM4PrOOB .

raoulh commented 6 years ago

About the failing build on macOS: https://www.gnu.org/software/gettext/FAQ.html#integrating_undefined

FragJage commented 6 years ago

Very good FAQ. Thanks.

FragJage commented 6 years ago

With LibIntl, executables are built but gmo/mo files build fail. It's because sed in OS X is a little bit different. I have found that some project disable NLS to build on osx.

raoulh commented 6 years ago

What are the side effects of disabling nls?

FragJage commented 6 years ago

NLS is Native Language Support. gettext is disable. This was already the case on your travis build 23.3 : see https://travis-ci.org/calaos/calaos_base/jobs/281186799 lines 2062 to 2066, library for gettext was not found. I added "brew link --force gettext" for the library could be found.

raoulh commented 6 years ago

Hmm, you are right. Actually the gettext package was required for running autogen.sh and glibtoolize.

I will do some research on my mac for building calaos_server with NLS enabled.

FragJage commented 6 years ago

I see two ways :

raoulh commented 6 years ago

Can be merged. Thanks a lot!