2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-29 13:17:43 +00:00

StaticMessages.sh for fastlane texts

Creates .pot files from txt files in the en-US store metadata and then
does the oposite for po files translated to the respective languages.

This should allow the translation teams to translate the store descriptions.
This commit is contained in:
Albert Vaca Cintora 2023-06-07 00:01:38 +00:00 committed by Albert Astals Cid
parent 610c030963
commit 06c1309a78

View File

@ -0,0 +1,21 @@
EXPORTS_POT_DIR=1
FILE_PREFIX=kdeconnect-android-store
function export_pot_dir # First parameter will be the path of the directory where we have to store the pot files
{
potdir=$1
txt2po --no-segmentation --progress=names -P -i ./metadata/android/en-US/short_description.txt -o $potdir/kdeconnect-android-store-short.pot
txt2po --no-segmentation --progress=names -P -i ./metadata/android/en-US/full_description.txt -o $potdir/kdeconnect-android-store-full.pot
}
function import_po_dirs # First parameter will be a path that will be a directory to the dirs for each lang and then all the .po files inside
{
podir=$1
for lang in $(ls $podir); do
mkdir -p ./metadata/android/$lang/
cp ./metadata/android/en-US/title.txt ./metadata/android/$lang/title.txt # we do not translate the app name
po2txt --fuzzy --progress=names -i $podir/$lang/kdeconnect-android-store-short.po -o ./metadata/android/$lang/short_description.txt
po2txt --fuzzy --progress=names -i $podir/$lang/kdeconnect-android-store-full.po -o ./metadata/android/$lang/full_description.txt
done
}