Add locale script (#945)
* Add locales script * Add gitignore exception Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
This commit is contained in:
parent
1ea6fea1d8
commit
20e23dcecd
|
|
@ -7,6 +7,7 @@ SAFETY_LOCK
|
|||
**/**dist
|
||||
**/**.egg*
|
||||
**/**.sh
|
||||
!archinstall/locales/locales_generator.sh
|
||||
**/**.egg-info/
|
||||
**/**build/
|
||||
**/**src/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd $(dirname "$0")/..
|
||||
|
||||
find . -type f -iname "*.py" | xargs xgettext -j --omit-header -d base -o locales/base.pot
|
||||
|
||||
for file in $(find locales/ -name "base.po"); do
|
||||
echo "Updating: $file"
|
||||
path=$(dirname $file)
|
||||
msgmerge --quiet --width 512 --update $file locales/base.pot
|
||||
msgfmt -o $path/base.mo $file
|
||||
done
|
||||
Loading…
Reference in New Issue