diff --git a/.tx/config b/.tx/config new file mode 100644 index 000000000..7c4b5d562 --- /dev/null +++ b/.tx/config @@ -0,0 +1,195 @@ +[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] +file_filter = Resources/.lproj/Localizable.strings +source_file = Resources/en.lproj/Localizable.strings +source_lang = en + +[linphone-ios.aboutviewcontrollerstrings] +file_filter = Classes/.lproj/AboutViewController.strings +source_file = Classes/Base.lproj/AboutViewController.strings +source_lang = en + + +[linphone-ios.chatroomviewcontrollerstrings] +file_filter = Classes/.lproj/ChatRoomViewController.strings +source_file = Classes/Base.lproj/ChatRoomViewController.strings +source_lang = en + + +[linphone-ios.chatviewcontrollerstrings] +file_filter = Classes/.lproj/ChatViewController.strings +source_file = Classes/Base.lproj/ChatViewController.strings +source_lang = en + + +[linphone-ios.contactdetailslabelviewcontrollerstrings] +file_filter = Classes/.lproj/ContactDetailsLabelViewController.strings +source_file = Classes/Base.lproj/ContactDetailsLabelViewController.strings +source_lang = en + + +[linphone-ios.contactdetailsviewcontrollerstrings] +file_filter = Classes/.lproj/ContactDetailsViewController.strings +source_file = Classes/Base.lproj/ContactDetailsViewController.strings +source_lang = en + + +[linphone-ios.contactsviewcontrollerstrings] +file_filter = Classes/.lproj/ContactsViewController.strings +source_file = Classes/Base.lproj/ContactsViewController.strings +source_lang = en + + +[linphone-ios.dialerviewcontrollerstrings] +file_filter = Classes/.lproj/DialerViewController.strings +source_file = Classes/Base.lproj/DialerViewController.strings +source_lang = en + + +[linphone-ios.dialerviewcontrolleripadstrings] +file_filter = Classes/.lproj/DialerViewController~ipad.strings +source_file = Classes/Base.lproj/DialerViewController~ipad.strings +source_lang = en + + +[linphone-ios.firstloginviewcontrollerstrings] +file_filter = Classes/.lproj/FirstLoginViewController.strings +source_file = Classes/Base.lproj/FirstLoginViewController.strings +source_lang = en + + +[linphone-ios.historydetailsviewcontrollerstrings] +file_filter = Classes/.lproj/HistoryDetailsViewController.strings +source_file = Classes/Base.lproj/HistoryDetailsViewController.strings +source_lang = en + + +[linphone-ios.historyviewcontrollerstrings] +file_filter = Classes/.lproj/HistoryViewController.strings +source_file = Classes/Base.lproj/HistoryViewController.strings +source_lang = en + + +[linphone-ios.imageviewcontrollerstrings] +file_filter = Classes/.lproj/ImageViewController.strings +source_file = Classes/Base.lproj/ImageViewController.strings +source_lang = en + + +[linphone-ios.incallviewcontrollerstrings] +file_filter = Classes/.lproj/InCallViewController.strings +source_file = Classes/Base.lproj/InCallViewController.strings +source_lang = en + + +[linphone-ios.incomingcallviewcontrollerstrings] +file_filter = Classes/.lproj/IncomingCallViewController.strings +source_file = Classes/Base.lproj/IncomingCallViewController.strings +source_lang = en + + +[linphone-ios.incomingcallviewcontrolleripadstrings] +file_filter = Classes/.lproj/IncomingCallViewController~ipad.strings +source_file = Classes/Base.lproj/IncomingCallViewController~ipad.strings +source_lang = en + + +[linphone-ios.wizardviewcontrollerstrings] +file_filter = Classes/.lproj/WizardViewController.strings +source_file = Classes/Base.lproj/WizardViewController.strings +source_lang = en + + +[linphone-ios.wizardviewcontrolleripadstrings] +file_filter = Classes/.lproj/WizardViewController~ipad.strings +source_file = Classes/Base.lproj/WizardViewController~ipad.strings +source_lang = en + + +[linphone-ios.wizardviewsstrings] +file_filter = Classes/.lproj/WizardViews.strings +source_file = Classes/Base.lproj/WizardViews.strings +source_lang = en + + +[linphone-ios.uicallbarstrings] +file_filter = Classes/LinphoneUI/.lproj/UICallBar.strings +source_file = Classes/LinphoneUI/Base.lproj/UICallBar.strings +source_lang = en + + +[linphone-ios.uicallbaripadstrings] +file_filter = Classes/LinphoneUI/.lproj/UICallBar~ipad.strings +source_file = Classes/LinphoneUI/Base.lproj/UICallBar~ipad.strings +source_lang = en + + +[linphone-ios.uicallcellstrings] +file_filter = Classes/LinphoneUI/.lproj/UICallCell.strings +source_file = Classes/LinphoneUI/Base.lproj/UICallCell.strings +source_lang = en + + +[linphone-ios.uichatcellstrings] +file_filter = Classes/LinphoneUI/.lproj/UIChatCell.strings +source_file = Classes/LinphoneUI/Base.lproj/UIChatCell.strings +source_lang = en + + +[linphone-ios.uichatroomcellstrings] +file_filter = Classes/LinphoneUI/.lproj/UIChatRoomCell.strings +source_file = Classes/LinphoneUI/Base.lproj/UIChatRoomCell.strings +source_lang = en + + +[linphone-ios.uiconferenceheaderstrings] +file_filter = Classes/LinphoneUI/.lproj/UIConferenceHeader.strings +source_file = Classes/LinphoneUI/Base.lproj/UIConferenceHeader.strings +source_lang = en + + +[linphone-ios.uicontactcellstrings] +file_filter = Classes/LinphoneUI/.lproj/UIContactCell.strings +source_file = Classes/LinphoneUI/Base.lproj/UIContactCell.strings +source_lang = en + + +[linphone-ios.uicontactdetailsfooterstrings] +file_filter = Classes/LinphoneUI/.lproj/UIContactDetailsFooter.strings +source_file = Classes/LinphoneUI/Base.lproj/UIContactDetailsFooter.strings +source_lang = en + + +[linphone-ios.uicontactdetailsheaderstrings] +file_filter = Classes/LinphoneUI/.lproj/UIContactDetailsHeader.strings +source_file = Classes/LinphoneUI/Base.lproj/UIContactDetailsHeader.strings +source_lang = en + + +[linphone-ios.uihistorycellstrings] +file_filter = Classes/LinphoneUI/.lproj/UIHistoryCell.strings +source_file = Classes/LinphoneUI/Base.lproj/UIHistoryCell.strings +source_lang = en + + +[linphone-ios.uimainbarstrings] +file_filter = Classes/LinphoneUI/.lproj/UIMainBar.strings +source_file = Classes/LinphoneUI/Base.lproj/UIMainBar.strings +source_lang = en + + +[linphone-ios.uimainbaripadstrings] +file_filter = Classes/LinphoneUI/.lproj/UIMainBar~ipad.strings +source_file = Classes/LinphoneUI/Base.lproj/UIMainBar~ipad.strings +source_lang = en + + +[linphone-ios.uistatebarstrings] +file_filter = Classes/LinphoneUI/.lproj/UIStateBar.strings +source_file = Classes/LinphoneUI/Base.lproj/UIStateBar.strings +source_lang = en + diff --git a/Classes/Base.lproj/AboutViewController.strings b/Classes/Base.lproj/AboutViewController.strings new file mode 100644 index 000000000..2f4d991a1 Binary files /dev/null and b/Classes/Base.lproj/AboutViewController.strings differ diff --git a/Classes/Base.lproj/ChatRoomViewController.strings b/Classes/Base.lproj/ChatRoomViewController.strings new file mode 100644 index 000000000..a05025f33 Binary files /dev/null and b/Classes/Base.lproj/ChatRoomViewController.strings differ diff --git a/Classes/Base.lproj/ChatViewController.strings b/Classes/Base.lproj/ChatViewController.strings new file mode 100644 index 000000000..df5f383df Binary files /dev/null and b/Classes/Base.lproj/ChatViewController.strings differ diff --git a/Classes/Base.lproj/ContactDetailsLabelViewController.strings b/Classes/Base.lproj/ContactDetailsLabelViewController.strings new file mode 100644 index 000000000..8b94d8006 Binary files /dev/null and b/Classes/Base.lproj/ContactDetailsLabelViewController.strings differ diff --git a/Classes/Base.lproj/ContactDetailsViewController.strings b/Classes/Base.lproj/ContactDetailsViewController.strings new file mode 100644 index 000000000..03077eff7 Binary files /dev/null and b/Classes/Base.lproj/ContactDetailsViewController.strings differ diff --git a/Classes/Base.lproj/ContactsViewController.strings b/Classes/Base.lproj/ContactsViewController.strings new file mode 100644 index 000000000..c293d1ca7 Binary files /dev/null and b/Classes/Base.lproj/ContactsViewController.strings differ diff --git a/Classes/Base.lproj/DialerViewController.strings b/Classes/Base.lproj/DialerViewController.strings new file mode 100644 index 000000000..ec1ffab03 Binary files /dev/null and b/Classes/Base.lproj/DialerViewController.strings differ diff --git a/Classes/Base.lproj/DialerViewController~ipad.strings b/Classes/Base.lproj/DialerViewController~ipad.strings new file mode 100644 index 000000000..ebef471b0 Binary files /dev/null and b/Classes/Base.lproj/DialerViewController~ipad.strings differ diff --git a/Classes/Base.lproj/FirstLoginViewController.strings b/Classes/Base.lproj/FirstLoginViewController.strings new file mode 100644 index 000000000..9a0f04f2d Binary files /dev/null and b/Classes/Base.lproj/FirstLoginViewController.strings differ diff --git a/Classes/Base.lproj/HistoryDetailsViewController.strings b/Classes/Base.lproj/HistoryDetailsViewController.strings new file mode 100644 index 000000000..2954ead48 Binary files /dev/null and b/Classes/Base.lproj/HistoryDetailsViewController.strings differ diff --git a/Classes/Base.lproj/HistoryViewController.strings b/Classes/Base.lproj/HistoryViewController.strings new file mode 100644 index 000000000..39300297a Binary files /dev/null and b/Classes/Base.lproj/HistoryViewController.strings differ diff --git a/Classes/Base.lproj/ImageViewController.strings b/Classes/Base.lproj/ImageViewController.strings new file mode 100644 index 000000000..c08d5260a Binary files /dev/null and b/Classes/Base.lproj/ImageViewController.strings differ diff --git a/Classes/Base.lproj/InCallViewController.strings b/Classes/Base.lproj/InCallViewController.strings new file mode 100644 index 000000000..a592b9719 Binary files /dev/null and b/Classes/Base.lproj/InCallViewController.strings differ diff --git a/Classes/Base.lproj/IncomingCallViewController.strings b/Classes/Base.lproj/IncomingCallViewController.strings new file mode 100644 index 000000000..c3aa723a5 Binary files /dev/null and b/Classes/Base.lproj/IncomingCallViewController.strings differ diff --git a/Classes/Base.lproj/IncomingCallViewController~ipad.strings b/Classes/Base.lproj/IncomingCallViewController~ipad.strings new file mode 100644 index 000000000..db1fb0f94 Binary files /dev/null and b/Classes/Base.lproj/IncomingCallViewController~ipad.strings differ diff --git a/Classes/Base.lproj/WizardViewController.strings b/Classes/Base.lproj/WizardViewController.strings new file mode 100644 index 000000000..638e700a9 Binary files /dev/null and b/Classes/Base.lproj/WizardViewController.strings differ diff --git a/Classes/Base.lproj/WizardViewController~ipad.strings b/Classes/Base.lproj/WizardViewController~ipad.strings new file mode 100644 index 000000000..be01bf7ee Binary files /dev/null and b/Classes/Base.lproj/WizardViewController~ipad.strings differ diff --git a/Classes/Base.lproj/WizardViews.strings b/Classes/Base.lproj/WizardViews.strings new file mode 100644 index 000000000..1f22b0423 Binary files /dev/null and b/Classes/Base.lproj/WizardViews.strings differ diff --git a/Classes/LinphoneUI/Base.lproj/UICallBar.strings b/Classes/LinphoneUI/Base.lproj/UICallBar.strings new file mode 100644 index 000000000..726f09e44 Binary files /dev/null and b/Classes/LinphoneUI/Base.lproj/UICallBar.strings differ diff --git a/Classes/LinphoneUI/Base.lproj/UICallBar~ipad.strings b/Classes/LinphoneUI/Base.lproj/UICallBar~ipad.strings new file mode 100644 index 000000000..b4e261950 Binary files /dev/null and b/Classes/LinphoneUI/Base.lproj/UICallBar~ipad.strings differ diff --git a/Classes/LinphoneUI/Base.lproj/UICallCell.strings b/Classes/LinphoneUI/Base.lproj/UICallCell.strings new file mode 100644 index 000000000..92138347c Binary files /dev/null and b/Classes/LinphoneUI/Base.lproj/UICallCell.strings differ diff --git a/Classes/LinphoneUI/Base.lproj/UIChatCell.strings b/Classes/LinphoneUI/Base.lproj/UIChatCell.strings new file mode 100644 index 000000000..c16425967 Binary files /dev/null and b/Classes/LinphoneUI/Base.lproj/UIChatCell.strings differ diff --git a/Classes/LinphoneUI/Base.lproj/UIChatRoomCell.strings b/Classes/LinphoneUI/Base.lproj/UIChatRoomCell.strings new file mode 100644 index 000000000..9ca9f1ae8 Binary files /dev/null and b/Classes/LinphoneUI/Base.lproj/UIChatRoomCell.strings differ diff --git a/Classes/LinphoneUI/Base.lproj/UIConferenceHeader.strings b/Classes/LinphoneUI/Base.lproj/UIConferenceHeader.strings new file mode 100644 index 000000000..7371f5243 Binary files /dev/null and b/Classes/LinphoneUI/Base.lproj/UIConferenceHeader.strings differ diff --git a/Classes/LinphoneUI/Base.lproj/UIContactCell.strings b/Classes/LinphoneUI/Base.lproj/UIContactCell.strings new file mode 100644 index 000000000..b3ed706ee Binary files /dev/null and b/Classes/LinphoneUI/Base.lproj/UIContactCell.strings differ diff --git a/Classes/LinphoneUI/Base.lproj/UIContactDetailsFooter.strings b/Classes/LinphoneUI/Base.lproj/UIContactDetailsFooter.strings new file mode 100644 index 000000000..85d6b67a3 Binary files /dev/null and b/Classes/LinphoneUI/Base.lproj/UIContactDetailsFooter.strings differ diff --git a/Classes/LinphoneUI/Base.lproj/UIContactDetailsHeader.strings b/Classes/LinphoneUI/Base.lproj/UIContactDetailsHeader.strings new file mode 100644 index 000000000..9da4ee791 Binary files /dev/null and b/Classes/LinphoneUI/Base.lproj/UIContactDetailsHeader.strings differ diff --git a/Classes/LinphoneUI/Base.lproj/UIHistoryCell.strings b/Classes/LinphoneUI/Base.lproj/UIHistoryCell.strings new file mode 100644 index 000000000..4bdf055cb Binary files /dev/null and b/Classes/LinphoneUI/Base.lproj/UIHistoryCell.strings differ diff --git a/Classes/LinphoneUI/Base.lproj/UIMainBar.strings b/Classes/LinphoneUI/Base.lproj/UIMainBar.strings new file mode 100644 index 000000000..c472a605a Binary files /dev/null and b/Classes/LinphoneUI/Base.lproj/UIMainBar.strings differ diff --git a/Classes/LinphoneUI/Base.lproj/UIMainBar~ipad.strings b/Classes/LinphoneUI/Base.lproj/UIMainBar~ipad.strings new file mode 100644 index 000000000..a12201c8a Binary files /dev/null and b/Classes/LinphoneUI/Base.lproj/UIMainBar~ipad.strings differ diff --git a/Classes/LinphoneUI/Base.lproj/UIStateBar.strings b/Classes/LinphoneUI/Base.lproj/UIStateBar.strings new file mode 100644 index 000000000..cce74a594 Binary files /dev/null and b/Classes/LinphoneUI/Base.lproj/UIStateBar.strings differ diff --git a/Resources/en.lproj/Localizable.strings b/Resources/en.lproj/Localizable.strings index 157c48b40..7beecb202 100644 Binary files a/Resources/en.lproj/Localizable.strings and b/Resources/en.lproj/Localizable.strings differ diff --git a/Tools/update_localization.sh b/Tools/update_localization.sh new file mode 100755 index 000000000..fffb57f3d --- /dev/null +++ b/Tools/update_localization.sh @@ -0,0 +1,36 @@ +#!/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/.lproj/')/$(basename $stringsfile) +source_file = $dir_name/$(basename $stringsfile) +source_lang = en +" >> $root_directory/.tx/config + fi + fi +done +rm $to_utf8