i18n: update localization and add Makefile targets pull-transifex and push-transifex

parent ab574265
[main]
host = https://www.transifex.com
lang_map = fr_CA:fr-rCA,pt_BR:pt-rBR,zh_CN:zh-rCN,zh_HK:zh-rHK,zh_TW:zh-rTW,da_DK:da-rDK,sv_SE:sv-rSE,kn_IN:kn-rIN,nl_NL:nl-rNL,en_NL:en-rNL
minimum_perc = 1
[linphone-ios.localizablestrings]
......
B/* No comment provided by engineer. */
......
B/* No comment provided by engineer. */
......
......@@ -43,6 +43,9 @@
/* No comment provided by engineer. */
"Answer" = "Answer";
/* No comment provided by engineer. */
"Are you sure to want to clear your proxy setup?" = "Are you sure to want to clear your proxy setup?";
/* No comment provided by engineer. */
"Average" = "Average";
......@@ -250,6 +253,9 @@
/* No comment provided by engineer. */
"No codec" = "No codec";
/* No comment provided by engineer. */
"No connectivity" = "No connectivity";
/* No comment provided by engineer. */
"No microphone" = "No microphone";
......@@ -283,6 +289,9 @@
/* No comment provided by engineer. */
"Please enter a valid domain.\n" = "Please enter a valid domain.\n";
/* No comment provided by engineer. */
"Please enter a valid username" = "Please enter a valid username";
/* No comment provided by engineer. */
"Please enter a valid username.\n" = "Please enter a valid username.\n";
......@@ -346,6 +355,9 @@
/* No comment provided by engineer. */
"SIP addresses" = "SIP addresses";
/* No comment provided by engineer. */
"Stay here" = "Stay here";
/* No comment provided by engineer. */
"Stop video" = "Stop video";
......@@ -397,6 +409,9 @@
/* No comment provided by engineer. */
"Yes" = "Yes";
/* No comment provided by engineer. */
"You can either skip verification or connect to the Internet first." = "You can either skip verification or connect to the Internet first.";
/* No comment provided by engineer. */
"You missed a call from %@" = "You missed a call from %@";
......
B/* No comment provided by engineer. */
......
B/* No comment provided by engineer. */
......
B/* No comment provided by engineer. */
......
B/* No comment provided by engineer. */
......@@ -2,6 +2,8 @@
root_directory=$(cd "$(dirname $0)" && pwd)/../
set -e
# The 2 only specific cases of the application: since we are length limited for push
# notifications, the ID is not matching the English translation... so we must keep
# the translations!
......@@ -17,31 +19,32 @@ sed -i.bak "s/= \"IM_MSG\";/= \"$IM_MSG_EN\";/" $localizable_en
rm $localizable_en.bak
to_utf8=$(mktemp -t linphone)
for xibfile in $(find $(find $root_directory/Classes -name Base.lproj) -name '*.xib'); do
stringsfile=${xibfile/.xib/.strings}
ibtool --generate-strings-file $stringsfile $xibfile
find $root_directory/Classes -not -path "$root_directory/Classes/KIF/*" -name Base.lproj -exec find {} -name '*.xib' \; | while read -r xibfile; do
stringsfile="${xibfile/.xib/.strings}"
ibtool --generate-strings-file "$stringsfile" "$xibfile"
# remove if empty
iconv -f utf-16 -t utf-8 $stringsfile > $to_utf8
if [ ! -s $to_utf8 ]; then
echo "$(basename $stringsfile) is empty, removing"
rm $stringsfile
else
echo "$(basename $xibfile)->$(basename $stringsfile)"
# remove if empty
iconv -f utf-16 -t utf-8 "$stringsfile" > "$to_utf8"
if [ ! -s "$to_utf8" ]; then
echo "$(basename "$stringsfile") is empty, removing"
rm "$stringsfile"
else
echo "$(basename "$xibfile")->$(basename "$stringsfile")"
res_name=$(basename $stringsfile | tr -d '_.~-' | tr '[:upper:]' '[:lower:]')
dir_name=$(echo $(dirname $stringsfile) | sed -E "s|$root_directory/||")
res_name=$(basename "$stringsfile" | tr -d '_.~-' | tr '[:upper:]' '[:lower:]')
dir_name=$(echo $(dirname "$stringsfile") | sed -E "s|$root_directory/||")
# if not registered in transifex config file, register it
if ! grep -q $res_name $root_directory/.tx/config; then
echo "not found in .tx/config, adding it"
echo "
[linphone-ios.$res_name]
file_filter = $(echo $dir_name| sed 's/Base.lproj/<lang>.lproj/')/$(basename $stringsfile)
source_file = $dir_name/$(basename $stringsfile)
file_filter = $(echo $dir_name| sed 's/Base.lproj/<lang>.lproj/')/$(basename "$stringsfile")
source_file = $dir_name/$(basename "$stringsfile")
source_lang = en
" >> $root_directory/.tx/config
fi
fi
fi
done
rm $to_utf8
#!/bin/sh
root_directory=$(cd "$(dirname $0)" && pwd)/../
rm $root_directory/Resources/en.lproj/Localizable.strings
find $root_directory/Classes -name '*.m' | xargs genstrings -u -a -o $root_directory/Resources/en.lproj/
to_utf8=$(mktemp -t linphone)
for xibfile in $(find $(find $root_directory/Classes -name Base.lproj) -name '*.xib'); do
stringsfile=${xibfile/.xib/.strings}
ibtool --generate-strings-file $stringsfile $xibfile
# remove if empty
iconv -f utf-16 -t utf-8 $stringsfile > $to_utf8
if [ ! -s $to_utf8 ]; then
echo "$(basename $stringsfile) is empty, removing"
rm $stringsfile
else
echo "$(basename $xibfile)->$(basename $stringsfile)"
res_name=$(basename $stringsfile | tr -d '_.~-' | tr '[:upper:]' '[:lower:]')
dir_name=$(echo $(dirname $stringsfile) | sed -E "s|$root_directory/||")
# if not registered in transifex config file, register it
if ! grep -q $res_name $root_directory/.tx/config; then
echo "not found in .tx/config, adding it"
echo "
[linphone-ios.$res_name]
file_filter = $(echo $dir_name| sed 's/Base.lproj/<lang>.lproj/')/$(basename $stringsfile)
source_file = $dir_name/$(basename $stringsfile)
source_lang = en
" >> $root_directory/.tx/config
fi
fi
done
rm $to_utf8
......@@ -110,12 +110,12 @@ broadcast_%:
@echo "Broadcasting target '$*' to all sub-architectures"
make -f builder-iphone-simulator.mk $(LINPHONE_OPTIONS) $* \
&& make -f builder-iphone-os.mk $(LINPHONE_OPTIONS) $* \
&& make -f builder-iphone-os.mk host=aarch64-apple-darwin $(LINPHONE_OPTIONS) $*
&& make -f builder-iphone-os.mk host=aarch64-apple-darwin $(LINPHONE_OPTIONS) $*
build-% clean-% veryclean-%:
make -f builder-iphone-simulator.mk $(LINPHONE_OPTIONS) $@ \
&& make -f builder-iphone-os.mk $(LINPHONE_OPTIONS) $@ \
&& make -f builder-iphone-os.mk host=aarch64-apple-darwin $(LINPHONE_OPTIONS) $@
&& make -f builder-iphone-os.mk host=aarch64-apple-darwin $(LINPHONE_OPTIONS) $@
sdk:
make -f builder-iphone-os.mk delivery-sdk
......@@ -137,6 +137,11 @@ veryclean: broadcast_veryclean
list-packages:
@make -f builder-iphone-os.mk list-packages
pull-transifex:
cd ../../ && tx pull -af
push-transifex:
cd ../../ && ./Tools/generate_strings_files.sh && tx push -s -t -f --no-interactive
zipres:
@tar -C ../.. -czf ../../ios_assets.tar.gz Resources iTunesArtwork
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment