- 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
master.locale=english.locale
locals: sort-locals locals.h locals_intern.h install-locals
sort-locals: $(top_srcdir)/data/locale/deutsch.locale $(top_srcdir)/data/locale/english.locale
cat $(top_srcdir)/data/locale/deutsch.locale | LC_ALL=C sort | uniq > deutsch.locale
cat $(top_srcdir)/data/locale/english.locale | LC_ALL=C sort | uniq > english.locale
cp -f deutsch.locale english.locale $(top_srcdir)/data/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
cp -f $(locale) $(top_srcdir)/data/locale
ordercheck: $(top_srcdir)/data/locale/deutsch.locale
cut -d' ' -f1 $(top_srcdir)/data/locale/deutsch.locale | LC_ALL=C sort | uniq > /tmp/log
cut -d' ' -f1 $(top_srcdir)/data/locale/deutsch.locale | uniq | diff - /tmp/log || \
(echo "ERROR: deutsch.locale not ordered or contains empty lines" && false)
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 || \
(echo "ERROR: $(master.locale) not ordered or contains empty lines" && false)
locals.h: ordercheck $(top_srcdir)/data/locale/deutsch.locale
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
locals.h: ordercheck
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
cut -d' ' -f1 $(top_srcdir)/data/locale/deutsch.locale | LC_ALL=C sort | uniq | $(top_srcdir)/data/locale/create.locals_intern.h
locals_intern.h: ordercheck
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
diff locals.h $(top_srcdir)/src/system
@@ -50,11 +55,11 @@ check: locals.h locals_intern.h
install-locals: 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 deutsch.locale english.locale $(top_srcdir)/data/locale
@echo "Consider committing data/locale/[deutsch.locale,english.locale]"
@echo "Consider committing src/system/[locals.h locals_intern.h]"
cp -f $(locale) $(top_srcdir)/data/locale
@echo "Consider committing data/locale/[$(locale)]"
locals-clean:
rm -f locals.h locals_intern.h deutsch.locale english.locale
rm -f locals.h locals_intern.h $(locale)
endif

View File

@@ -12,7 +12,7 @@ directory: /var/tuxbox/config/locale or /share/tuxbox/neutrino/locale
Master file:
------------
deutsch.locale is considered the master file.
english.locale is considered the master file.
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?
---------------------------------
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.
2.)
Enter the directory build_tmp/neutrino-hd/data/locale.
3.)
Use for sorting (deutsch.locale,english.locale) 'make sort-locals', use 'make ordercheck' to for
verification.
Use for sorting 'make sort-locals', use 'make ordercheck' to for verification.
4.)
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:
-------------
- 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
- sort
- uxterm

View File

@@ -1,5 +1,5 @@
#!/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 \
echo $i:; \
echo "----------------"; \

View File

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

View File

@@ -1,5 +1,5 @@
#!/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
#ifndef __locals__
#define __locals__

View File

@@ -1,5 +1,5 @@
#!/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
#ifndef __locals_intern__
#define __locals_intern__