From: Marcin Haba Date: Tue, 23 May 2017 05:01:12 +0000 (+0200) Subject: baculum: Add Japanese language support in deb and rpm packages X-Git-Tag: Release-7.9.0~11 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f18e29fda0fe158d88d8cd50fa03484c7d162c2d;p=bacula%2Fbacula baculum: Add Japanese language support in deb and rpm packages --- diff --git a/gui/baculum/Makefile b/gui/baculum/Makefile index 84cfa52ec3..7474314a72 100644 --- a/gui/baculum/Makefile +++ b/gui/baculum/Makefile @@ -67,7 +67,7 @@ miscfilesrc = index.php \ LICENSE \ README -localelang = en pl pt +localelang = en pl pt ja localewebdirsrc = $(datadir)/$(webdir)/Lang localeapidirsrc = $(datadir)/$(apidir)/Lang localefile = messages.mo diff --git a/gui/baculum/debian/baculum-web.install b/gui/baculum/debian/baculum-web.install index 3063bfe298..d93ef8fb1b 100644 --- a/gui/baculum/debian/baculum-web.install +++ b/gui/baculum/debian/baculum-web.install @@ -10,4 +10,5 @@ build/usr/share/baculum/htdocs/protected/Web/Init.php /usr/share/baculum build/usr/share/baculum/htdocs/protected/Web/endpoints.xml /usr/share/baculum/htdocs/protected/Web/ build/usr/share/locale/en/LC_MESSAGES/baculum-web.mo /usr/share/locale/en/LC_MESSAGES/ build/usr/share/locale/pl/LC_MESSAGES/baculum-web.mo /usr/share/locale/pl/LC_MESSAGES/ -build/usr/share/locale/pt/LC_MESSAGES/baculum-web.mo /usr/share/locale/pt/LC_MESSAGES/ \ No newline at end of file +build/usr/share/locale/pt/LC_MESSAGES/baculum-web.mo /usr/share/locale/pt/LC_MESSAGES/ +build/usr/share/locale/ja/LC_MESSAGES/baculum-web.mo /usr/share/locale/ja/LC_MESSAGES/ \ No newline at end of file diff --git a/gui/baculum/debian/baculum-web.links b/gui/baculum/debian/baculum-web.links index e91614101c..b9ef327982 100644 --- a/gui/baculum/debian/baculum-web.links +++ b/gui/baculum/debian/baculum-web.links @@ -3,4 +3,5 @@ var/cache/baculum usr/share/baculum/htdocs/assets var/cache/baculum usr/share/baculum/htdocs/protected/runtime usr/share/locale/en/LC_MESSAGES/baculum-web.mo usr/share/baculum/htdocs/protected/Web/Lang/en/messages.mo usr/share/locale/pl/LC_MESSAGES/baculum-web.mo usr/share/baculum/htdocs/protected/Web/Lang/pl/messages.mo -usr/share/locale/pt/LC_MESSAGES/baculum-web.mo usr/share/baculum/htdocs/protected/Web/Lang/pt/messages.mo \ No newline at end of file +usr/share/locale/pt/LC_MESSAGES/baculum-web.mo usr/share/baculum/htdocs/protected/Web/Lang/pt/messages.mo +usr/share/locale/ja/LC_MESSAGES/baculum-web.mo usr/share/baculum/htdocs/protected/Web/Lang/ja/messages.mo \ No newline at end of file diff --git a/gui/baculum/examples/rpm-template/baculum.spec b/gui/baculum/examples/rpm-template/baculum.spec index 61b549fa87..6f864b441a 100644 --- a/gui/baculum/examples/rpm-template/baculum.spec +++ b/gui/baculum/examples/rpm-template/baculum.spec @@ -1,4 +1,5 @@ -%global langs en pl +%global langs_api en pl +%global langs_web en pl pt ja %global destdir build %global metaname baculum @@ -148,8 +149,10 @@ make build DESTDIR=%{destdir} # Remove these cache directories, because here will be symbolic links rmdir %{destdir}/%{_datadir}/%{metaname}/htdocs/assets rmdir %{destdir}/%{_datadir}/%{metaname}/htdocs/protected/runtime -for lang in %{langs}; do +for lang in %{langs_api}; do rm %{destdir}/%{_datadir}/%{metaname}/htdocs/protected/API/Lang/${lang}/messages.mo +done +for lang in %{langs_web}; do rm %{destdir}/%{_datadir}/%{metaname}/htdocs/protected/Web/Lang/${lang}/messages.mo done @@ -165,7 +168,7 @@ ln -s %{_localstatedir}/cache/%{metaname} %{_datadir}/%{metaname}/htdocs/protec %post api # because framework does not use system locale dir, here are linked # locale files to framework location -for lang in %{langs}; do +for lang in %{langs_api}; do ln -s %{_datadir}/locale/${lang}/LC_MESSAGES/%{metaname}-api.mo \ %{_datadir}/%{metaname}/htdocs/protected/API/Lang/${lang}/messages.mo done @@ -173,7 +176,7 @@ done %post web # because framework does not use system locale dir, here are linked # locale files to framework location -for lang in %{langs}; do +for lang in %{langs_web}; do ln -s %{_datadir}/locale/${lang}/LC_MESSAGES/%{metaname}-web.mo \ %{_datadir}/%{metaname}/htdocs/protected/Web/Lang/${lang}/messages.mo done @@ -199,12 +202,12 @@ rm %{_datadir}/%{metaname}/htdocs/assets rm %{_datadir}/%{metaname}/htdocs/protected/runtime %preun api -for lang in %{langs}; do +for lang in %{langs_api}; do rm %{_datadir}/%{metaname}/htdocs/protected/API/Lang/${lang}/messages.mo done %preun web -for lang in %{langs}; do +for lang in %{langs_web}; do rm %{_datadir}/%{metaname}/htdocs/protected/Web/Lang/${lang}/messages.mo done