- locale: since focus deutsch.locale isn't longer the masterfile

This commit is contained in:
svenhoefer
2012-10-24 15:14:39 +02:00
parent 2e250fcb24
commit ddef0da724
6 changed files with 29 additions and 25 deletions

View File

@@ -26,23 +26,28 @@ install_DATA += $(locale_unmaintained)
if MAINTAINER_MODE if MAINTAINER_MODE
master.locale=english.locale
locals: sort-locals locals.h locals_intern.h install-locals locals: sort-locals locals.h locals_intern.h install-locals
sort-locals: $(top_srcdir)/data/locale/deutsch.locale $(top_srcdir)/data/locale/english.locale sort-locals: $(top_srcdir)/data/locale/$(master.locale)
cat $(top_srcdir)/data/locale/deutsch.locale | LC_ALL=C sort | uniq > deutsch.locale for locale in $(locale); do \
cat $(top_srcdir)/data/locale/english.locale | LC_ALL=C sort | uniq > english.locale cat $(top_srcdir)/data/locale/$${locale} | LC_ALL=C sort | uniq > $${locale}; \
cp -f deutsch.locale english.locale $(top_srcdir)/data/locale done
cp -f $(locale) $(top_srcdir)/data/locale
ordercheck: $(top_srcdir)/data/locale/deutsch.locale ordercheck: $(top_srcdir)/data/locale/$(master.locale)
cut -d' ' -f1 $(top_srcdir)/data/locale/deutsch.locale | LC_ALL=C sort | uniq > /tmp/log cut -d' ' -f1 $(top_srcdir)/data/locale/$(master.locale) | LC_ALL=C sort | uniq > /tmp/log
cut -d' ' -f1 $(top_srcdir)/data/locale/deutsch.locale | uniq | diff - /tmp/log || \ cut -d' ' -f1 $(top_srcdir)/data/locale/$(master.locale) | uniq | diff - /tmp/log || \
(echo "ERROR: deutsch.locale not ordered or contains empty lines" && false) (echo "ERROR: $(master.locale) not ordered or contains empty lines" && false)
locals.h: ordercheck $(top_srcdir)/data/locale/deutsch.locale locals.h: ordercheck
cut -d' ' -f1 $(top_srcdir)/data/locale/deutsch.locale | LC_ALL=C sort | uniq | tr [:lower:] [:upper:] | tr \. \_ | tr \- \_ | tr -d \? | $(top_srcdir)/data/locale/create.locals.h cut -d' ' -f1 $(top_srcdir)/data/locale/$(master.locale) | LC_ALL=C sort | uniq | tr [:lower:] [:upper:] | tr \. \_ | tr \- \_ | tr -d \? | \
$(top_srcdir)/data/locale/create.locals.h
locals_intern.h: ordercheck $(top_srcdir)/data/locale/deutsch.locale locals_intern.h: ordercheck
cut -d' ' -f1 $(top_srcdir)/data/locale/deutsch.locale | LC_ALL=C sort | uniq | $(top_srcdir)/data/locale/create.locals_intern.h cut -d' ' -f1 $(top_srcdir)/data/locale/$(master.locale) | LC_ALL=C sort | uniq | \
$(top_srcdir)/data/locale/create.locals_intern.h
check: locals.h locals_intern.h check: locals.h locals_intern.h
diff locals.h $(top_srcdir)/src/system diff locals.h $(top_srcdir)/src/system
@@ -50,11 +55,11 @@ check: locals.h locals_intern.h
install-locals: locals.h locals_intern.h install-locals: locals.h locals_intern.h
cp locals.h locals_intern.h $(top_srcdir)/src/system cp locals.h locals_intern.h $(top_srcdir)/src/system
@echo "Consider committing src/system/[locals.h,locals_intern.h]" @echo "Consider committing src/system/[locals.h locals_intern.h]"
cp -f deutsch.locale english.locale $(top_srcdir)/data/locale cp -f $(locale) $(top_srcdir)/data/locale
@echo "Consider committing data/locale/[deutsch.locale,english.locale]" @echo "Consider committing data/locale/[$(locale)]"
locals-clean: locals-clean:
rm -f locals.h locals_intern.h deutsch.locale english.locale rm -f locals.h locals_intern.h $(locale)
endif endif

View File

@@ -12,7 +12,7 @@ directory: /var/tuxbox/config/locale or /share/tuxbox/neutrino/locale
Master file: Master file:
------------ ------------
deutsch.locale is considered the master file. english.locale is considered the master file.
Verfication of .locale files: Verfication of .locale files:
@@ -27,15 +27,14 @@ Use the check.locale.files shell script for detecting
How do I add a new locale string? How do I add a new locale string?
--------------------------------- ---------------------------------
1.) 1.)
First of all, add the new string to deutsch.locale while preserving First of all, add the new string to english.locale while preserving
the ordering. Do not add any empty lines. the ordering. Do not add any empty lines.
2.) 2.)
Enter the directory build_tmp/neutrino-hd/data/locale. Enter the directory build_tmp/neutrino-hd/data/locale.
3.) 3.)
Use for sorting (deutsch.locale,english.locale) 'make sort-locals', use 'make ordercheck' to for Use for sorting 'make sort-locals', use 'make ordercheck' to for verification.
verification.
4.) 4.)
Create new versions of the files src/system/locals.h and src/system/locals_intern.h Create new versions of the files src/system/locals.h and src/system/locals_intern.h
@@ -60,7 +59,7 @@ locale-files, src/system/locals.h, and src/system/locals_intern.h.
Useful tools: Useful tools:
------------- -------------
- emacs (add '(file-coding-system-alist (quote (("\\.locale\\'" . utf-8-unix) ("" undecided)))) to .emacs or use "C-x <RET> c utf-8 <RET> C-x C-f deutsch.locale") - emacs (add '(file-coding-system-alist (quote (("\\.locale\\'" . utf-8-unix) ("" undecided)))) to .emacs or use "C-x <RET> c utf-8 <RET> C-x C-f english.locale")
- iconv - iconv
- sort - sort
- uxterm - uxterm

View File

@@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
cut -d' ' -f1 deutsch.locale | sort | uniq > /tmp/log cut -d' ' -f1 english.locale | sort | uniq > /tmp/log
for i in *.locale; do \ for i in *.locale; do \
echo $i:; \ echo $i:; \
echo "----------------"; \ echo "----------------"; \

View File

@@ -7,7 +7,7 @@
# Written by Barf on 2005-12-10. # Written by Barf on 2005-12-10.
$masterfilename = "deutsch.locale"; $masterfilename = "english.locale";
$#ARGV == 0 || die("Usage: create-locals-update.pl file.locale."); $#ARGV == 0 || die("Usage: create-locals-update.pl file.locale.");

View File

@@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# usage: cut -d' ' -f1 deutsch.locale | LC_ALL=C sort | uniq | tr [:lower:] [:upper:] | tr \. \_ | tr \- \_ | tr -d \? | ./create.locals.h # usage: cut -d' ' -f1 english.locale | LC_ALL=C sort | uniq | tr [:lower:] [:upper:] | tr \. \_ | tr \- \_ | tr -d \? | ./create.locals.h
cat > locals.h <<EOF cat > locals.h <<EOF
#ifndef __locals__ #ifndef __locals__
#define __locals__ #define __locals__

View File

@@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# usage: cut -d' ' -f1 deutsch.locale | LC_ALL=C sort | uniq | ./create.locals_intern.h # usage: cut -d' ' -f1 english.locale | LC_ALL=C sort | uniq | ./create.locals_intern.h
cat > locals_intern.h <<EOF cat > locals_intern.h <<EOF
#ifndef __locals_intern__ #ifndef __locals_intern__
#define __locals_intern__ #define __locals_intern__