mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
i18n: add missing Locaziable.strings to resources
This commit is contained in:
parent
2216c12e85
commit
c371e2b4da
11 changed files with 48 additions and 58 deletions
36
.tx/config
36
.tx/config
|
|
@ -2,189 +2,163 @@
|
|||
host = https://www.transifex.com
|
||||
minimum_perc = 1
|
||||
|
||||
[linphone-ios.localizablestrings]
|
||||
file_filter = Resources/<lang>.lproj/Localizable.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.aboutviewstrings]
|
||||
file_filter = Classes/<lang>.lproj/AboutView.strings
|
||||
source_file = Classes/Base.lproj/AboutView.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.assistantviewstrings]
|
||||
file_filter = Classes/<lang>.lproj/AssistantView.strings
|
||||
source_file = Classes/Base.lproj/AssistantView.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.assistantviewscreensstrings]
|
||||
file_filter = Classes/<lang>.lproj/AssistantViewScreens.strings
|
||||
source_file = Classes/Base.lproj/AssistantViewScreens.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.callincomingviewstrings]
|
||||
file_filter = Classes/<lang>.lproj/CallIncomingView.strings
|
||||
source_file = Classes/Base.lproj/CallIncomingView.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.calloutgoingviewstrings]
|
||||
file_filter = Classes/<lang>.lproj/CallOutgoingView.strings
|
||||
source_file = Classes/Base.lproj/CallOutgoingView.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.callviewstrings]
|
||||
file_filter = Classes/<lang>.lproj/CallView.strings
|
||||
source_file = Classes/Base.lproj/CallView.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.chatconversationcreateviewstrings]
|
||||
file_filter = Classes/<lang>.lproj/ChatConversationCreateView.strings
|
||||
source_file = Classes/Base.lproj/ChatConversationCreateView.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.chatconversationviewstrings]
|
||||
file_filter = Classes/<lang>.lproj/ChatConversationView.strings
|
||||
source_file = Classes/Base.lproj/ChatConversationView.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.chatslistviewstrings]
|
||||
file_filter = Classes/<lang>.lproj/ChatsListView.strings
|
||||
source_file = Classes/Base.lproj/ChatsListView.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.contactdetailsviewstrings]
|
||||
file_filter = Classes/<lang>.lproj/ContactDetailsView.strings
|
||||
source_file = Classes/Base.lproj/ContactDetailsView.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.contactslistviewstrings]
|
||||
file_filter = Classes/<lang>.lproj/ContactsListView.strings
|
||||
source_file = Classes/Base.lproj/ContactsListView.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.dialerviewstrings]
|
||||
file_filter = Classes/<lang>.lproj/DialerView.strings
|
||||
source_file = Classes/Base.lproj/DialerView.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.firstloginviewstrings]
|
||||
file_filter = Classes/<lang>.lproj/FirstLoginView.strings
|
||||
source_file = Classes/Base.lproj/FirstLoginView.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.historydetailsviewstrings]
|
||||
file_filter = Classes/<lang>.lproj/HistoryDetailsView.strings
|
||||
source_file = Classes/Base.lproj/HistoryDetailsView.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.historylistviewstrings]
|
||||
file_filter = Classes/<lang>.lproj/HistoryListView.strings
|
||||
source_file = Classes/Base.lproj/HistoryListView.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.imageviewstrings]
|
||||
file_filter = Classes/<lang>.lproj/ImageView.strings
|
||||
source_file = Classes/Base.lproj/ImageView.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.launchscreenstrings]
|
||||
file_filter = Classes/<lang>.lproj/LaunchScreen.strings
|
||||
source_file = Classes/Base.lproj/LaunchScreen.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.settingsviewstrings]
|
||||
file_filter = Classes/<lang>.lproj/SettingsView.strings
|
||||
source_file = Classes/Base.lproj/SettingsView.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.sidemenuviewstrings]
|
||||
file_filter = Classes/<lang>.lproj/SideMenuView.strings
|
||||
source_file = Classes/Base.lproj/SideMenuView.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.statusbarviewstrings]
|
||||
file_filter = Classes/LinphoneUI/<lang>.lproj/StatusBarView.strings
|
||||
source_file = Classes/LinphoneUI/Base.lproj/StatusBarView.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.tabbarviewstrings]
|
||||
file_filter = Classes/LinphoneUI/<lang>.lproj/TabBarView.strings
|
||||
source_file = Classes/LinphoneUI/Base.lproj/TabBarView.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.uicallconferencecellstrings]
|
||||
file_filter = Classes/LinphoneUI/<lang>.lproj/UICallConferenceCell.strings
|
||||
source_file = Classes/LinphoneUI/Base.lproj/UICallConferenceCell.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.uicallpausedcellstrings]
|
||||
file_filter = Classes/LinphoneUI/<lang>.lproj/UICallPausedCell.strings
|
||||
source_file = Classes/LinphoneUI/Base.lproj/UICallPausedCell.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.uichatbubblephotocellstrings]
|
||||
file_filter = Classes/LinphoneUI/<lang>.lproj/UIChatBubblePhotoCell.strings
|
||||
source_file = Classes/LinphoneUI/Base.lproj/UIChatBubblePhotoCell.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.uichatbubbletextcellstrings]
|
||||
file_filter = Classes/LinphoneUI/<lang>.lproj/UIChatBubbleTextCell.strings
|
||||
source_file = Classes/LinphoneUI/Base.lproj/UIChatBubbleTextCell.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.uichatcellstrings]
|
||||
file_filter = Classes/LinphoneUI/<lang>.lproj/UIChatCell.strings
|
||||
source_file = Classes/LinphoneUI/Base.lproj/UIChatCell.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.uichatcreatecellstrings]
|
||||
file_filter = Classes/LinphoneUI/<lang>.lproj/UIChatCreateCell.strings
|
||||
source_file = Classes/LinphoneUI/Base.lproj/UIChatCreateCell.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.uiconfirmationdialogstrings]
|
||||
file_filter = Classes/LinphoneUI/<lang>.lproj/UIConfirmationDialog.strings
|
||||
source_file = Classes/LinphoneUI/Base.lproj/UIConfirmationDialog.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.uicontactcellstrings]
|
||||
file_filter = Classes/LinphoneUI/<lang>.lproj/UIContactCell.strings
|
||||
source_file = Classes/LinphoneUI/Base.lproj/UIContactCell.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.uicontactdetailscellstrings]
|
||||
file_filter = Classes/LinphoneUI/<lang>.lproj/UIContactDetailsCell.strings
|
||||
source_file = Classes/LinphoneUI/Base.lproj/UIContactDetailsCell.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
[linphone-ios.uihistorycellstrings]
|
||||
file_filter = Classes/LinphoneUI/<lang>.lproj/UIHistoryCell.strings
|
||||
source_file = Classes/LinphoneUI/Base.lproj/UIHistoryCell.strings
|
||||
source_lang = en
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -141,26 +141,40 @@ void linphone_iphone_log_handler(int lev, const char *fmt, va_list args) {
|
|||
switch (format) {
|
||||
case LinphoneDateHistoryList:
|
||||
if (sameYear) {
|
||||
formatstr = NSLocalizedString(@"EEE dd MMMM", nil);
|
||||
formatstr = NSLocalizedString(@"EEE dd MMMM",
|
||||
@"Date formatting in History List, for current year (also see "
|
||||
@"http://cybersam.com/ios-dev/quick-guide-to-ios-dateformatting)");
|
||||
} else {
|
||||
formatstr = NSLocalizedString(@"EEE dd MMMM yyyy", nil);
|
||||
formatstr = NSLocalizedString(@"EEE dd MMMM yyyy",
|
||||
@"Date formatting in History List, for previous years (also see "
|
||||
@"http://cybersam.com/ios-dev/quick-guide-to-ios-dateformatting)");
|
||||
}
|
||||
break;
|
||||
case LinphoneDateHistoryDetails:
|
||||
formatstr = NSLocalizedString(@"MM/dd '-' HH'h'mm", nil);
|
||||
formatstr = NSLocalizedString(@"MM/dd '-' HH'h'mm", @"Date formatting in History Details (also see "
|
||||
@"http://cybersam.com/ios-dev/"
|
||||
@"quick-guide-to-ios-dateformatting)");
|
||||
break;
|
||||
case LinphoneDateChatList:
|
||||
if (sameDay) {
|
||||
formatstr = NSLocalizedString(@"HH:mm", nil);
|
||||
formatstr =
|
||||
NSLocalizedString(@"HH:mm", @"Date formatting in Chat List, for current day (also see "
|
||||
@"http://cybersam.com/ios-dev/quick-guide-to-ios-dateformatting)");
|
||||
} else {
|
||||
formatstr = NSLocalizedString(@"MM/dd", nil);
|
||||
formatstr =
|
||||
NSLocalizedString(@"MM/dd", @"Date formatting in Chat List, for all but current day (also see "
|
||||
@"http://cybersam.com/ios-dev/quick-guide-to-ios-dateformatting)");
|
||||
}
|
||||
break;
|
||||
case LinphoneDateChatBubble:
|
||||
if (sameDay) {
|
||||
formatstr = NSLocalizedString(@"HH:mm", nil);
|
||||
formatstr =
|
||||
NSLocalizedString(@"HH:mm", @"Date formatting in Conversation bubbles, for current day (also see "
|
||||
@"http://cybersam.com/ios-dev/quick-guide-to-ios-dateformatting)");
|
||||
} else {
|
||||
formatstr = NSLocalizedString(@"MM/dd - HH:mm", nil);
|
||||
formatstr = NSLocalizedString(@"MM/dd - HH:mm",
|
||||
@"Date formatting in Conversation bubbles, for all but current day (also "
|
||||
@"see http://cybersam.com/ios-dev/quick-guide-to-ios-dateformatting)");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -416,17 +430,19 @@ void linphone_iphone_log_handler(int lev, const char *fmt, va_list args) {
|
|||
|
||||
@implementation ContactDisplay
|
||||
|
||||
+ (void)setDisplayNameLabel:(UILabel *)label forContact:(ABRecordRef)contact {
|
||||
+ (void)setDisplayNameLabel:(UILabel *)label forContact:(const LinphoneFriend *)contact {
|
||||
label.text = [FastAddressBook displayNameForContact:contact];
|
||||
#if 0
|
||||
NSString *lLastName = CFBridgingRelease(ABRecordCopyValue(contact, kABPersonLastNameProperty));
|
||||
NSString *lLocalizedLastName = [FastAddressBook localizedLabel:lLastName];
|
||||
if (lLocalizedLastName) {
|
||||
[label boldSubstring:lLocalizedLastName];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
+ (void)setDisplayNameLabel:(UILabel *)label forAddress:(const LinphoneAddress *)addr {
|
||||
ABRecordRef contact = [FastAddressBook getContactWithAddress:addr];
|
||||
const LinphoneFriend *contact = [FastAddressBook getContactWithAddress:addr];
|
||||
if (contact) {
|
||||
[ContactDisplay setDisplayNameLabel:label forContact:contact];
|
||||
} else {
|
||||
|
|
|
|||
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.
|
|
@ -29,6 +29,19 @@ if [ $# != 0 ]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
function generate_transifex_config {
|
||||
res_name=$1
|
||||
file_filter=$2
|
||||
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 = $file_filter
|
||||
source_lang = en
|
||||
" >> $root_directory/.tx/config
|
||||
fi
|
||||
}
|
||||
|
||||
##### 1. Generate Localizable.strings from source files (.m)
|
||||
function generate_localizable_from_sources {
|
||||
#WARNING: in case of sed issue "extra characters at the end of g command", it means that
|
||||
|
|
@ -49,6 +62,8 @@ function generate_localizable_from_sources {
|
|||
sed -i.bak "s/= \"IM_MSG\";/= \"$IM_MSG_EN\";/" $localizable_en.tmp
|
||||
iconv -f utf-8 -t utf-16LE $localizable_en.tmp > $localizable_en
|
||||
rm $localizable_en.tmp.bak $localizable_en.tmp
|
||||
|
||||
generate_transifex_config localizablestrings "Resources/<lang>.lproj/Localizable.strings"
|
||||
}
|
||||
|
||||
##### 2. Generate .strings for all XIB files
|
||||
|
|
@ -70,16 +85,8 @@ function generate_strings_from_xib {
|
|||
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 "$res_name 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
|
||||
|
||||
generate_transifex_config $res_name $(echo $dir_name| sed 's/Base.lproj/<lang>.lproj/')/$(basename "$stringsfile")
|
||||
fi
|
||||
done
|
||||
rm $to_utf8_file
|
||||
|
|
@ -99,14 +106,7 @@ function generate_strings_from_inappsettings_plist {
|
|||
mv $tmp_file $root_directory/Settings/InAppSettings.bundle/en.lproj/$plistfilestrings
|
||||
|
||||
res_name=inappsettings$(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 = Settings/InAppSettings.bundle/<lang>.lproj/$plistfilestrings
|
||||
source_lang = en
|
||||
" >> $root_directory/.tx/config
|
||||
fi
|
||||
generate_transifex_config $res_name "Settings/InAppSettings.bundle/<lang>.lproj/$plistfilestrings"
|
||||
done
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue