mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 15:02:50 +02:00
locale: rework helpers
Origin commit data
------------------
Branch: ni/coolstream
Commit: d69e119903
Author: vanhofen <vanhofen@gmx.de>
Date: 2022-12-03 (Sat, 03 Dec 2022)
Origin message was:
------------------
- locale: rework helpers
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
50
data/locale/create-locale
Executable file
50
data/locale/create-locale
Executable file
@@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
|
||||
locale_master="deutsch.locale"
|
||||
locale="${locale_master} english.locale"
|
||||
|
||||
check_locale() {
|
||||
cut -d' ' -f1 ${locale_master} | LC_ALL=C sort | uniq > /tmp/${locale_master}
|
||||
for l in ${locale}; do
|
||||
test $l == ${locale_master} && continue
|
||||
echo $l:
|
||||
echo "----------------"
|
||||
cut -d' ' -f1 $l | diff -u - /tmp/${locale_master}
|
||||
echo
|
||||
done
|
||||
rm /tmp/${locale_master}
|
||||
}
|
||||
|
||||
sort_locale() {
|
||||
for l in ${locale}; do
|
||||
cat ${l} | LC_ALL=C sort | uniq > ${l}.tmp
|
||||
mv ${l}.tmp ${l}
|
||||
done
|
||||
}
|
||||
|
||||
create_locale_work() {
|
||||
for l in ${locale}; do
|
||||
helpers/create-locale-work ${l}
|
||||
done
|
||||
}
|
||||
|
||||
create_locals_h() {
|
||||
cut -d' ' -f1 ${locale_master} | LC_ALL=C sort | uniq | tr [:lower:] [:upper:] | tr \. \_ | tr \- \_ | tr -d \? | \
|
||||
helpers/create-locals_h
|
||||
mv locals.h ../../src/system
|
||||
}
|
||||
|
||||
create_locals_intern_h() {
|
||||
cut -d' ' -f1 ${locale_master} | LC_ALL=C sort | uniq | \
|
||||
helpers/create-locals_intern_h
|
||||
mv locals_intern.h ../../src/system
|
||||
}
|
||||
|
||||
#check_locale
|
||||
sort_locale
|
||||
create_locale_work
|
||||
create_locals_h
|
||||
create_locals_intern_h
|
||||
|
||||
echo "Consider committing src/system/[locals.h locals_intern.h]"
|
||||
echo "and data/locale/[${locale}]"
|
Reference in New Issue
Block a user