diff --git a/data/locale/Makefile.am b/data/locale/Makefile.am index 654d8eea9..feed9a7bc 100644 --- a/data/locale/Makefile.am +++ b/data/locale/Makefile.am @@ -28,16 +28,22 @@ if MAINTAINER_MODE master.locale=english.locale -locals: sort-locals locals.h locals_intern.h install-locals +locals: sort-locals work-locals locals.h locals_intern.h +$(master.locale) \ sort-locals: $(top_srcdir)/data/locale/$(master.locale) for locale in $(locale); do \ cat $(top_srcdir)/data/locale/$${locale} | LC_ALL=C sort | uniq > $${locale}; \ done -ordercheck: $(top_srcdir)/data/locale/$(master.locale) - cut -d' ' -f1 $(top_srcdir)/data/locale/$(master.locale) | LC_ALL=C sort | uniq > /tmp/log - cut -d' ' -f1 $(top_srcdir)/data/locale/$(master.locale) | uniq | diff - /tmp/log || \ +work-locals: $(master.locale) + for locale in $(locale); do \ + $(top_srcdir)/data/locale/helpers/create-locals-work $${locale}; \ + done + +ordercheck: $(master.locale) + cut -d' ' -f1 $(master.locale) | LC_ALL=C sort | uniq > /tmp/log + cut -d' ' -f1 $(master.locale) | uniq | diff - /tmp/log || \ (echo "ERROR: $(master.locale) not ordered or contains empty lines" && false) locals.h: ordercheck @@ -52,7 +58,7 @@ check: locals.h locals_intern.h diff locals.h $(top_srcdir)/src/system diff locals_intern.h $(top_srcdir)/src/system -install-locals: sort-locals locals.h locals_intern.h +install-locals: $(locale) locals.h locals_intern.h cp locals.h locals_intern.h $(top_srcdir)/src/system @echo "Consider committing src/system/[locals.h locals_intern.h]" cp -f $(locale) $(top_srcdir)/data/locale diff --git a/data/locale/_readme.txt b/data/locale/_readme.txt index 364b955ea..8c47c902f 100644 --- a/data/locale/_readme.txt +++ b/data/locale/_readme.txt @@ -37,21 +37,21 @@ Enter the directory build_tmp/neutrino-hd/data/locale. Use for sorting 'make sort-locals', use 'make ordercheck' to for verification. 4.) +To the extent possible, update other locale file. For this, 'make work-locals' +may be useful. if you find a file called *.locale-work, merge this into *.locale + +5.) Create new versions of the files src/system/locals.h and src/system/locals_intern.h using the command 'make locals.h locals_intern.h'. -5.) -Check the modifications with 'make check' - 6.) -Copy the replacement file to their destination with 'make install-locals' +Check the modifications with 'make check' 7.) Or use for item 3-6 'make locals' 8.) -To the extent possible, update other locale file. For this, the -Perl-script ./helpers/create-locals-work may be useful. +Copy the replacement file to their destination with 'make install-locals' 9.) If committing the changes to Git, commit both the involved diff --git a/data/locale/helpers/create-locals-work b/data/locale/helpers/create-locals-work index 9dfe879b0..4c9fba0f1 100755 --- a/data/locale/helpers/create-locals-work +++ b/data/locale/helpers/create-locals-work @@ -43,7 +43,7 @@ while () { close(outfile); -print "There were ", $no_errors, " error(s).\n"; +print "There were ", $no_errors, " error(s) in ", $localefilename, ".\n"; if ($no_errors == 0) { unlink($outfilename);