forked from mirrors/linphone-iphone
i10n: add Settings page to translatable resources
This commit is contained in:
parent
bb65694634
commit
b6d7b48d2e
57 changed files with 170 additions and 305 deletions
29
.tx/config
29
.tx/config
|
|
@ -4,7 +4,34 @@ minimum_perc = 1
|
|||
|
||||
[linphone-ios.localizablestrings]
|
||||
file_filter = Resources/<lang>.lproj/Localizable.strings
|
||||
source_file = Resources/en.lproj/Localizable.strings
|
||||
source_lang = en
|
||||
|
||||
[linphone-ios.inappsettingsadvancedstrings]
|
||||
file_filter = Settings/InAppSettings.bundle/<lang>.lproj/Advanced.strings
|
||||
source_lang = en
|
||||
|
||||
[linphone-ios.inappsettingsaudiostrings]
|
||||
file_filter = Settings/InAppSettings.bundle/<lang>.lproj/Audio.strings
|
||||
source_lang = en
|
||||
|
||||
[linphone-ios.inappsettingscallstrings]
|
||||
file_filter = Settings/InAppSettings.bundle/<lang>.lproj/Call.strings
|
||||
source_lang = en
|
||||
|
||||
[linphone-ios.inappsettingsnetworkstrings]
|
||||
file_filter = Settings/InAppSettings.bundle/<lang>.lproj/Network.strings
|
||||
source_lang = en
|
||||
|
||||
[linphone-ios.inappsettingsrootstrings]
|
||||
file_filter = Settings/InAppSettings.bundle/<lang>.lproj/Root.strings
|
||||
source_lang = en
|
||||
|
||||
[linphone-ios.inappsettingstunnelstrings]
|
||||
file_filter = Settings/InAppSettings.bundle/<lang>.lproj/Tunnel.strings
|
||||
source_lang = en
|
||||
|
||||
[linphone-ios.inappsettingsvideostrings]
|
||||
file_filter = Settings/InAppSettings.bundle/<lang>.lproj/Video.strings
|
||||
source_lang = en
|
||||
|
||||
[linphone-ios.aboutviewcontrollerstrings]
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -43,6 +43,9 @@
|
|||
/* No comment provided by engineer. */
|
||||
"Answer" = "Answer";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Application logs" = "Application logs";
|
||||
|
||||
/* 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?";
|
||||
|
||||
|
|
@ -91,6 +94,9 @@
|
|||
/* No comment provided by engineer. */
|
||||
"Check issue" = "Check issue";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Choose an action" = "Choose an action";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Choose the image size" = "Choose the image size";
|
||||
|
||||
|
|
@ -112,12 +118,18 @@
|
|||
/* No comment provided by engineer. */
|
||||
"Continue video" = "Continue video";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Debug" = "Debug";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Decline" = "Decline";
|
||||
|
||||
/* ICE has established a direct connection to the remote host */
|
||||
"Direct connection" = "Direct connection";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Disable logs" = "Disable logs";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Disabled, build from sources to enable" = "Disabled, build from sources to enable";
|
||||
|
||||
|
|
@ -136,6 +148,9 @@
|
|||
/* No comment provided by engineer. */
|
||||
"Email addresses" = "Email addresses";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Enable logs" = "Enable logs";
|
||||
|
||||
/* Enter an address */
|
||||
"Enter an address" = "Enter an address";
|
||||
|
||||
|
|
@ -151,6 +166,9 @@
|
|||
/* No comment provided by engineer. */
|
||||
"Error" = "Error";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Error: no mail account configured" = "Error: no mail account configured";
|
||||
|
||||
/* ICE processing has failed */
|
||||
"Failed" = "Failed";
|
||||
|
||||
|
|
@ -340,6 +358,9 @@
|
|||
/* No comment provided by engineer. */
|
||||
"Select picture source" = "Select picture source";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Send logs" = "Send logs";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Settings" = "Settings";
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -38,7 +38,7 @@
|
|||
</dict>
|
||||
<dict>
|
||||
<key>Title</key>
|
||||
<string></string>
|
||||
<string>Other</string>
|
||||
<key>Type</key>
|
||||
<string>PSGroupSpecifier</string>
|
||||
</dict>
|
||||
|
|
@ -162,7 +162,7 @@
|
|||
<key>Type</key>
|
||||
<string>PSGroupSpecifier</string>
|
||||
<key>Title</key>
|
||||
<string></string>
|
||||
<string>File sharing</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>AutocapitalizationType</key>
|
||||
|
|
@ -174,7 +174,7 @@
|
|||
<key>Type</key>
|
||||
<string>PSTextFieldSpecifier</string>
|
||||
<key>Title</key>
|
||||
<string>Sharing server</string>
|
||||
<string>Server URL</string>
|
||||
<key>Key</key>
|
||||
<string>sharing_server_preference</string>
|
||||
<key>IASKTextAlignment</key>
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@
|
|||
</dict>
|
||||
<dict>
|
||||
<key>Title</key>
|
||||
<string></string>
|
||||
<string>Development debug actions</string>
|
||||
<key>Type</key>
|
||||
<string>PSGroupSpecifier</string>
|
||||
</dict>
|
||||
|
|
|
|||
|
|
@ -7,9 +7,6 @@
|
|||
/* Console */
|
||||
"Console" = "المُحاوِرة";
|
||||
|
||||
/* */
|
||||
"" = "";
|
||||
|
||||
/* Animations */
|
||||
"Animations" = "رسوم حيوية";
|
||||
|
||||
|
|
|
|||
|
|
@ -43,9 +43,6 @@
|
|||
/* Advanced */
|
||||
"Advanced" = "متقدم";
|
||||
|
||||
/* */
|
||||
"" = "";
|
||||
|
||||
/* About */
|
||||
"About" = "حول التطبيق";
|
||||
|
||||
|
|
@ -62,4 +59,4 @@
|
|||
"More options" = "الخيارات الأخرى";
|
||||
|
||||
/* Clear Account */
|
||||
"Clear Account" = "Clear Account";
|
||||
"Clear Account" = "Clear Account";
|
||||
|
|
|
|||
BIN
Settings/InAppSettings.bundle/de.lproj/Tunnel.strings
Normal file
BIN
Settings/InAppSettings.bundle/de.lproj/Tunnel.strings
Normal file
Binary file not shown.
|
|
@ -1,55 +1,16 @@
|
|||
/* Debug */
|
||||
"Debug" = "Debug";
|
||||
|
||||
/* Debug */
|
||||
"Debug" = "Debug";
|
||||
|
||||
/* Console */
|
||||
"Console" = "Console";
|
||||
|
||||
/* */
|
||||
"" = "";
|
||||
|
||||
/* Animations */
|
||||
"Send Logs" = "Send Logs";
|
||||
"Clear Logs" = "Clear Logs";
|
||||
"Other" = "Other";
|
||||
"Animations" = "Animations";
|
||||
|
||||
/* Rotation */
|
||||
"Rotation" = "Rotation";
|
||||
|
||||
/* Background mode */
|
||||
"Background mode" = "Background mode";
|
||||
|
||||
/* Start at boot */
|
||||
"Start at boot" = "Start at boot";
|
||||
|
||||
/* First login view */
|
||||
"Auto-answer after notification" = "Auto-answer after notification";
|
||||
"First login view" = "First login view";
|
||||
|
||||
/* Expire */
|
||||
"Expire" = "Expire";
|
||||
|
||||
/* Primary account */
|
||||
"Primary account" = "Standalone calls (no proxy)";
|
||||
|
||||
/* Display name */
|
||||
"Primary account" = "Primary account";
|
||||
"Display name" = "Display name";
|
||||
|
||||
/* Sharing server */
|
||||
"Sharing server" = "Sharing server";
|
||||
|
||||
/* Username */
|
||||
"Username" = "Username";
|
||||
|
||||
/* Rotation */
|
||||
"Rotation" = "Rotation";
|
||||
|
||||
/* Automatic */
|
||||
"Automatic" = "Automatic";
|
||||
|
||||
/* Portrait */
|
||||
"Portrait" = "Portrait";
|
||||
|
||||
/* Landscape */
|
||||
"Landscape" = "Landscape";
|
||||
|
||||
"Auto-answer after notification" = "Auto-answer after notification";
|
||||
"File sharing" = "File sharing";
|
||||
"Server URL" = "Server URL";
|
||||
|
|
|
|||
|
|
@ -1,56 +1,26 @@
|
|||
/* Codecs */
|
||||
"Codecs" = "Codecs";
|
||||
|
||||
/* AMR */
|
||||
"AMR" = "AMR";
|
||||
|
||||
/* Speex 16Khz */
|
||||
"Speex 16Khz" = "Speex 16Khz";
|
||||
|
||||
/* Speex 8Khz */
|
||||
"Speex 8Khz" = "Speex 8Khz";
|
||||
|
||||
/* Silk 24Khz */
|
||||
"Opus 48kHz" = "Opus 48kHz";
|
||||
"Silk 24Khz" = "Silk 24Khz";
|
||||
|
||||
/* Silk 16Khz */
|
||||
"Silk 16Khz" = "Silk 16Khz";
|
||||
|
||||
/* G722 */
|
||||
"AAC-ELD 16kHz" = "AAC-ELD 16kHz";
|
||||
"AAC-ELD 22kHz" = "AAC-ELD 22kHz";
|
||||
"AAC-ELD 32kHz" = "AAC-ELD 32kHz";
|
||||
"AAC-ELD 44kHz" = "AAC-ELD 44kHz";
|
||||
"AAC-ELD 48kHz" = "AAC-ELD 48kHz";
|
||||
"AMR" = "AMR";
|
||||
"G722" = "G722";
|
||||
|
||||
/* G729 */
|
||||
"G729" = "G729";
|
||||
|
||||
/* GSM */
|
||||
"GSM" = "GSM";
|
||||
|
||||
/* ILBC */
|
||||
"ILBC" = "ILBC";
|
||||
|
||||
/* PCMU */
|
||||
"PCMU" = "PCMU";
|
||||
|
||||
/* PCMA */
|
||||
"PCMA" = "PCMA";
|
||||
|
||||
/* Advanced */
|
||||
"Advanced" = "Advanced";
|
||||
|
||||
/* Playback gain */
|
||||
"Playback gain" = "Playback gain";
|
||||
|
||||
/* Microphone gain */
|
||||
"Microphone gain" = "Microphone gain";
|
||||
|
||||
/* Adaptive rate control */
|
||||
"Adaptive rate control" = "Adaptive rate control";
|
||||
|
||||
/* Network bitrate limit */
|
||||
"Network bitrate limit" = "Network bitrate limit";
|
||||
|
||||
/* Voice processing */
|
||||
"Enable Voice Processing"="Enable Voice Processing";
|
||||
|
||||
/* Bass Boost / equalizer */
|
||||
"Enable Bass Boost"="Enable Bass Boost";
|
||||
"Adaptive rate algorithm" = "Adaptive rate algorithm";
|
||||
"Codec bitrate limit" = "Codec bitrate limit";
|
||||
"Enable Voice Processing" = "Enable Voice Processing";
|
||||
"Enable Bass Boost" = "Enable Bass Boost";
|
||||
|
|
|
|||
|
|
@ -1,17 +1,7 @@
|
|||
/* Prefix */
|
||||
"Prefix" = "Prefix";
|
||||
|
||||
/* Substitue + by 00 */
|
||||
"Substitue + by 00" = "Substitue + by 00";
|
||||
|
||||
/* Send inband DTMFs */
|
||||
"Send inband DTMFs" = "Send inband DTMFs";
|
||||
|
||||
/* Send SIP INFO DTMFs */
|
||||
"Send SIP INFO DTMFs" = "Send SIP INFO DTMFs";
|
||||
|
||||
/* Incoming call timeout */
|
||||
"Incoming call timeout" = "Incoming call timeout";
|
||||
|
||||
/* In call timeout */
|
||||
"In call timeout" = "In call timeout";
|
||||
"In call timeout" = "In call timeout";
|
||||
"Voice mail URI" = "Voice mail URI";
|
||||
|
|
|
|||
|
|
@ -1,65 +1,14 @@
|
|||
/* Wifi only */
|
||||
"Wifi only" = "Wifi only";
|
||||
|
||||
/* Edge optimization */
|
||||
"Edge optimization" = "Edge optimization";
|
||||
|
||||
/* Stun Server */
|
||||
"Wifi only" = "Wifi only";
|
||||
"Stun Server" = "Stun Server";
|
||||
|
||||
/* ICE */
|
||||
"ICE" = "ICE";
|
||||
|
||||
/* Random Port */
|
||||
"Random Port" = "Random Port";
|
||||
|
||||
/* Port */
|
||||
"Port" = "Port";
|
||||
|
||||
/* Audio Port(s) */
|
||||
"Audio Port(s)" = "Audio Port(s)";
|
||||
|
||||
/* Video Port(s) */
|
||||
"Video Port(s)" = "Video Port(s)";
|
||||
|
||||
/* Transport */
|
||||
"Transport" = "Transport";
|
||||
|
||||
/* Media Encryption */
|
||||
"Use IPv6" = "Use IPv6";
|
||||
"Media Encryption" = "Media Encryption";
|
||||
|
||||
/* Push Notifications */
|
||||
"Push Notification" = "Push Notification";
|
||||
|
||||
/* Transport */
|
||||
"Transport" = "Transport";
|
||||
|
||||
/* UDP */
|
||||
"UDP" = "UDP";
|
||||
|
||||
/* TCP */
|
||||
"TCP" = "TCP";
|
||||
|
||||
/* TLS */
|
||||
"TLS" = "TLS";
|
||||
|
||||
/* None */
|
||||
"None" = "None";
|
||||
|
||||
/* SRTP */
|
||||
"SRTP" = "SRTP";
|
||||
|
||||
/* ZRTP */
|
||||
"ZRTP" = "ZRTP";
|
||||
|
||||
/* Limits */
|
||||
"Limits" = "Limits";
|
||||
|
||||
/* Upload bandwidth */
|
||||
"Upload bandwidth" = "Upload bandwidth";
|
||||
|
||||
/* Download bandwidth */
|
||||
"Download bandwidth" = "Download bandwidth";
|
||||
|
||||
/* IPv6 */
|
||||
"Use IPv6" = "Use IPv6";
|
||||
|
|
@ -1,65 +1,26 @@
|
|||
/* SIP account */
|
||||
"SIP account" = "SIP account";
|
||||
|
||||
/* Wizard */
|
||||
"Wizard" = "Run assistant";
|
||||
|
||||
/* User name */
|
||||
"Wizard" = "Wizard";
|
||||
"Clear Account" = "Clear Account";
|
||||
"User name" = "User name";
|
||||
|
||||
/* User ID */
|
||||
"User ID" = "User ID";
|
||||
|
||||
/* Password */
|
||||
"Password" = "Password";
|
||||
|
||||
/* Domain */
|
||||
"Domain" = "Domain";
|
||||
|
||||
/* Proxy */
|
||||
"Proxy" = "Proxy";
|
||||
|
||||
/* Outbound proxy */
|
||||
"Transport" = "Transport";
|
||||
"Outbound proxy" = "Outbound proxy";
|
||||
|
||||
/* Settings */
|
||||
"Settings" = "Settings";
|
||||
|
||||
/* Enable video */
|
||||
"Enable video" = "Enable video";
|
||||
|
||||
/* Audio */
|
||||
"Audio" = "Audio";
|
||||
|
||||
/* Video */
|
||||
"Video" = "Video";
|
||||
|
||||
/* Call */
|
||||
"Call" = "Call";
|
||||
|
||||
/* Network */
|
||||
"Network" = "Network";
|
||||
|
||||
/* Advanced */
|
||||
"Advanced" = "Advanced";
|
||||
|
||||
/* */
|
||||
"" = "";
|
||||
|
||||
/* About */
|
||||
"About" = "About";
|
||||
|
||||
/* Quit */
|
||||
"Quit" = "Quit";
|
||||
|
||||
/* Release */
|
||||
"Release" = "Release";
|
||||
|
||||
/* Clear cache */
|
||||
"Clear cache" = "Clear cache";
|
||||
|
||||
/* More options */
|
||||
"AVPF" = "AVPF";
|
||||
"More options" = "More options";
|
||||
|
||||
/* Clear Account */
|
||||
"Clear Account" = "Clear Account";
|
||||
"Settings" = "Settings";
|
||||
"Enable video" = "Enable video";
|
||||
"Audio" = "Audio";
|
||||
"Video" = "Video";
|
||||
"Call" = "Call";
|
||||
"Network" = "Network";
|
||||
"Tunnel" = "Tunnel";
|
||||
"Advanced" = "Advanced";
|
||||
"Development debug actions" = "Development debug actions";
|
||||
"About" = "About";
|
||||
"Quit" = "Quit";
|
||||
"Exit" = "Exit";
|
||||
"Clear cache" = "Clear cache";
|
||||
"Battery alert" = "Battery alert";
|
||||
|
|
|
|||
|
|
@ -1,20 +1,3 @@
|
|||
/* Auto */
|
||||
"Auto" = "Auto";
|
||||
|
||||
/* Address */
|
||||
"Address" = "Address";
|
||||
|
||||
/* Mode */
|
||||
"Mode" = "Mode";
|
||||
|
||||
/* Off */
|
||||
"Off" = "Off";
|
||||
|
||||
/* On */
|
||||
"On" = "On";
|
||||
|
||||
/* Port */
|
||||
"Address" = "Address";
|
||||
"Port" = "Port";
|
||||
|
||||
/* WWAN */
|
||||
"WWAN" = "WWAN";
|
||||
|
|
@ -1,27 +1,9 @@
|
|||
/* Automatically start video */
|
||||
"Automatically start" = "Automatically start";
|
||||
|
||||
/* Automatically accept video */
|
||||
"Automatically accept" = "Automatically accept";
|
||||
|
||||
/* Show self view */
|
||||
"Show self view" = "Show self view";
|
||||
|
||||
/* Show preview */
|
||||
"Show preview" = "Show preview";
|
||||
|
||||
/* Preferred video size */
|
||||
"Preferred video size" = "Preferred video size";
|
||||
|
||||
/* Codecs */
|
||||
"Codecs" = "Codecs";
|
||||
|
||||
/* mpeg4 */
|
||||
"mpeg4" = "mpeg4";
|
||||
|
||||
/* h264 */
|
||||
"h264" = "h264";
|
||||
|
||||
/* VP8 */
|
||||
"VP8" = "VP8";
|
||||
|
||||
|
|
|
|||
|
|
@ -7,9 +7,6 @@
|
|||
/* Console */
|
||||
"Console" = "Console";
|
||||
|
||||
/* */
|
||||
"" = "";
|
||||
|
||||
/* Animations */
|
||||
"Animations" = "Animations";
|
||||
|
||||
|
|
@ -52,4 +49,4 @@
|
|||
/* Landscape */
|
||||
"Landscape" = "Paysage";
|
||||
|
||||
"Auto-answer after notification" = "Réponse auto. sur notification";
|
||||
"Auto-answer after notification" = "Réponse auto. sur notification";
|
||||
|
|
|
|||
|
|
@ -43,9 +43,6 @@
|
|||
/* Advanced */
|
||||
"Advanced" = "Avancées";
|
||||
|
||||
/* */
|
||||
"" = "";
|
||||
|
||||
/* About */
|
||||
"About" = "À Propos";
|
||||
|
||||
|
|
@ -62,4 +59,4 @@
|
|||
"More options" = "Plus d'options";
|
||||
|
||||
/* Clear Account */
|
||||
"Clear Account" = "Effacer le compte";
|
||||
"Clear Account" = "Effacer le compte";
|
||||
|
|
|
|||
BIN
Settings/InAppSettings.bundle/ja.lproj/Network.strings
Normal file
BIN
Settings/InAppSettings.bundle/ja.lproj/Network.strings
Normal file
Binary file not shown.
BIN
Settings/InAppSettings.bundle/ja.lproj/Tunnel.strings
Normal file
BIN
Settings/InAppSettings.bundle/ja.lproj/Tunnel.strings
Normal file
Binary file not shown.
BIN
Settings/InAppSettings.bundle/nl.lproj/Network.strings
Normal file
BIN
Settings/InAppSettings.bundle/nl.lproj/Network.strings
Normal file
Binary file not shown.
BIN
Settings/InAppSettings.bundle/nl.lproj/Tunnel.strings
Normal file
BIN
Settings/InAppSettings.bundle/nl.lproj/Tunnel.strings
Normal file
Binary file not shown.
|
|
@ -7,9 +7,6 @@
|
|||
/* Console */
|
||||
"Console" = "Консоль";
|
||||
|
||||
/* */
|
||||
"" = "";
|
||||
|
||||
/* Animations */
|
||||
"Animations" = "Анимации";
|
||||
|
||||
|
|
@ -52,4 +49,4 @@
|
|||
/* Landscape */
|
||||
"Landscape" = "Альбомный";
|
||||
|
||||
"Auto-answer after notification" = "Auto-answer after notification";
|
||||
"Auto-answer after notification" = "Auto-answer after notification";
|
||||
|
|
|
|||
|
|
@ -43,9 +43,6 @@
|
|||
/* Advanced */
|
||||
"Advanced" = "Дополнительный";
|
||||
|
||||
/* */
|
||||
"" = "";
|
||||
|
||||
/* About */
|
||||
"About" = "О программе";
|
||||
|
||||
|
|
@ -62,4 +59,4 @@
|
|||
"More options" = "Дополнительный счет";
|
||||
|
||||
/* Clear Account */
|
||||
"Clear Account" = "Clear Account";
|
||||
"Clear Account" = "Clear Account";
|
||||
|
|
|
|||
BIN
Settings/InAppSettings.bundle/ru.lproj/Tunnel.strings
Normal file
BIN
Settings/InAppSettings.bundle/ru.lproj/Tunnel.strings
Normal file
Binary file not shown.
BIN
Settings/InAppSettings.bundle/zh_TW.lproj/Tunnel.strings
Normal file
BIN
Settings/InAppSettings.bundle/zh_TW.lproj/Tunnel.strings
Normal file
Binary file not shown.
|
|
@ -4,47 +4,86 @@ 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!
|
||||
localizable_en=$root_directory/Resources/en.lproj/Localizable.strings
|
||||
IC_MSG_EN=$(sed -nE 's/"IC_MSG" = "(.*)";/\1/p' $localizable_en)
|
||||
IM_MSG_EN=$(sed -nE 's/"IM_MSG" = "(.*)";/\1/p' $localizable_en)
|
||||
rm -f $localizable_en
|
||||
find $root_directory/Classes -name '*.m' | xargs genstrings -u -a -o $(dirname $localizable_en)
|
||||
iconv -f utf-16 -t utf-8 $localizable_en > $localizable_en.tmp
|
||||
mv $localizable_en.tmp $localizable_en
|
||||
sed -i.bak "s/= \"IC_MSG\";/= \"$IC_MSG_EN\";/" $localizable_en
|
||||
sed -i.bak "s/= \"IM_MSG\";/= \"$IM_MSG_EN\";/" $localizable_en
|
||||
rm $localizable_en.bak
|
||||
if [ $# != 0 ]; then
|
||||
echo "No argument needed. This script will (re)generate .strings file from .xib files and register them in the transifex config file located in .tx/config."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
to_utf8=$(mktemp -t linphone)
|
||||
##### 1. Generate Localizable.strings from source files (.m)
|
||||
function generate_localizable_from_sources {
|
||||
localizable_en=$root_directory/Resources/en.lproj/Localizable.strings
|
||||
# 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!
|
||||
IC_MSG_EN=$(sed -nE 's/"IC_MSG" = "(.*)";/\1/p' $localizable_en)
|
||||
IM_MSG_EN=$(sed -nE 's/"IM_MSG" = "(.*)";/\1/p' $localizable_en)
|
||||
rm -f $localizable_en
|
||||
find $root_directory/Classes -name '*.m' | xargs genstrings -u -a -o $(dirname $localizable_en)
|
||||
iconv -f utf-16 -t utf-8 $localizable_en > $localizable_en.tmp
|
||||
mv $localizable_en.tmp $localizable_en
|
||||
sed -i.bak "s/= \"IC_MSG\";/= \"$IC_MSG_EN\";/" $localizable_en
|
||||
sed -i.bak "s/= \"IM_MSG\";/= \"$IM_MSG_EN\";/" $localizable_en
|
||||
rm $localizable_en.bak
|
||||
}
|
||||
|
||||
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}"
|
||||
##### 2. Generate .strings for all XIB files
|
||||
function generate_strings_from_xib {
|
||||
to_utf8_file=$(mktemp -t linphone)
|
||||
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"
|
||||
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_file"
|
||||
if [ ! -s "$to_utf8_file" ]; 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
|
||||
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_file
|
||||
}
|
||||
|
||||
##### 3. Generate .strings for all InAppSettings PLIST files
|
||||
function generate_strings_from_inappsettings_plist {
|
||||
tmp_file=$(mktemp -t linphone)
|
||||
find $root_directory/Settings/InAppSettings.bundle -name '*.plist' | while read -r plistfile; do
|
||||
echo $plistfile
|
||||
plistfilestrings="$(basename ${plistfile/.plist/.strings})"
|
||||
printf '' > $tmp_file
|
||||
while read title; do
|
||||
echo "\"$title\" = \"$title\";" >> $tmp_file
|
||||
done <<< "$(grep -e '>Title<' $plistfile -A 1 | sed -nE 's|.*<string>(.*)</string>.*|\1|p')"
|
||||
|
||||
mv $tmp_file $root_directory/Settings/InAppSettings.bundle/en.lproj/$plistfilestrings
|
||||
|
||||
res_name=$(echo "$plistfilestrings" | tr -d '_.~-' | tr '[:upper:]' '[:lower:]')
|
||||
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 = Settings/InAppSettings.bundle/<lang>.lproj/$plistfilestrings
|
||||
source_lang = en
|
||||
" >> $root_directory/.tx/config
|
||||
fi
|
||||
fi
|
||||
done
|
||||
rm $to_utf8
|
||||
done
|
||||
}
|
||||
|
||||
# generate_localizable_from_sources
|
||||
# generate_strings_from_xib
|
||||
generate_strings_from_inappsettings_plist
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue