From 4c3b7cbe08a53f916cdd89a74b92019ceec0494e Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Fri, 7 Sep 2012 20:03:23 -0700 Subject: [PATCH] Extract TextSecure strings for i18n. 1) Change all instances which use concatenation to build strings with variables in them to use string formatting instead. 2) Extract all string literals from layouts and menus into strings.xml 3) Extract all string literals from code into strings.xml --- AndroidManifest.xml | 24 +- res/drawable-hdpi/hairline_left.9.png | Bin 1105 -> 0 bytes res/drawable-hdpi/hairline_right.9.png | Bin 1106 -> 0 bytes res/drawable-hdpi/ic_lock_message_sms.png | Bin 789 -> 0 bytes res/drawable-mdpi/hairline_left.9.png | Bin 1090 -> 0 bytes res/drawable-mdpi/hairline_right.9.png | Bin 1091 -> 0 bytes res/drawable-xhdpi/hairline_left.9.png | Bin 1132 -> 0 bytes res/drawable-xhdpi/hairline_right.9.png | Bin 1130 -> 0 bytes res/layout/auto_initiate_activity.xml | 10 +- res/layout/change_passphrase_activity.xml | 10 +- res/layout/contact_list_item.xml | 84 ---- .../contact_selection_group_activity.xml | 41 +- res/layout/contact_selection_group_item.xml | 17 - .../contact_selection_list_activity.xml | 21 +- res/layout/contact_selection_list_item.xml | 17 - .../contact_selection_recent_activity.xml | 23 +- res/layout/contacts_list_content.xml | 45 -- res/layout/conversation_activity.xml | 20 +- res/layout/conversation_fragment_cab.xml | 2 +- res/layout/create_passphrase_activity.xml | 10 +- res/layout/icon_list_item.xml | 18 - res/layout/main.xml | 16 - res/layout/mms_download_view.xml | 43 -- res/layout/prompt_passphrase_activity.xml | 4 +- res/layout/receive_key_activity.xml | 8 +- res/layout/recent_call_item_selectable.xml | 21 +- res/layout/recipients_panel.xml | 2 +- res/layout/review_identities.xml | 2 +- res/layout/save_identity_activity.xml | 6 +- res/layout/send_key_activity.xml | 37 -- res/layout/verify_identity_activity.xml | 4 +- .../verify_imported_identity_activity.xml | 10 +- res/layout/verify_keys_activity.xml | 4 +- res/layout/view_identity_activity.xml | 6 +- res/menu/contact_selection.xml | 2 +- res/menu/contact_selection_list.xml | 4 +- res/menu/conversation.xml | 4 +- res/menu/conversation_button_context.xml | 2 +- res/menu/conversation_callable.xml | 2 +- res/menu/conversation_context.xml | 8 +- res/menu/conversation_insecure.xml | 2 +- res/menu/conversation_list.xml | 2 +- res/menu/conversation_list_batch.xml | 8 +- res/menu/conversation_secure_unverified.xml | 8 +- res/menu/conversation_secure_verified.xml | 8 +- res/menu/key_scanning.xml | 6 +- res/menu/text_secure_locked.xml | 2 +- res/menu/text_secure_normal.xml | 12 +- res/menu/verify_keys.xml | 2 +- res/values/colors.xml | 25 +- res/values/strings.xml | 383 ++++++++++++++++++ res/xml/preferences.xml | 74 ++-- .../securesms/ApplicationExportManager.java | 28 +- .../ApplicationMigrationManager.java | 15 +- .../ApplicationPreferencesActivity.java | 23 +- .../securesms/ConversationActivity.java | 35 +- .../securesms/ConversationAdapter.java | 2 +- .../securesms/ConversationFragment.java | 9 +- .../securesms/ConversationItem.java | 43 +- .../securesms/ConversationListAdapter.java | 4 +- .../securesms/ConversationListFragment.java | 12 +- .../securesms/ConversationListItem.java | 2 +- .../DecryptingConversationListAdapter.java | 24 +- .../securesms/KeyScanningActivity.java | 2 +- .../securesms/PassphraseChangeActivity.java | 6 +- .../securesms/PassphraseCreateActivity.java | 11 +- .../securesms/PassphrasePromptActivity.java | 4 +- .../securesms/ReceiveKeyActivity.java | 110 +++-- .../securesms/ReviewIdentitiesActivity.java | 4 +- .../securesms/SaveIdentityActivity.java | 12 +- .../securesms/VerifyIdentityActivity.java | 27 +- .../VerifyImportedIdentityActivity.java | 73 ++-- .../securesms/VerifyKeysActivity.java | 21 +- .../securesms/ViewIdentityActivity.java | 14 +- .../crypto/KeyExchangeInitiator.java | 9 +- .../crypto/MessageDisplayHelper.java | 56 +-- .../database/CanonicalAddressDatabase.java | 96 ++--- .../database/CanonicalSessionMigrator.java | 40 +- .../securesms/database/LocalKeyRecord.java | 101 +++-- .../securesms/database/MmsDatabase.java | 244 +++++------ .../securesms/database/MmsMessageRecord.java | 81 ++-- .../securesms/database/SessionRecord.java | 106 ++--- .../securesms/mms/MmsFactory.java | 27 +- .../LedBlinkPatternListPreference.java | 46 +-- .../securesms/protocol/Prefix.java | 20 +- .../service/ApplicationMigrationService.java | 4 +- .../securesms/service/KeyCachingService.java | 7 +- .../securesms/service/MessageNotifier.java | 48 +-- .../thoughtcrime/securesms/util/Dialogs.java | 8 +- 89 files changed, 1228 insertions(+), 1205 deletions(-) delete mode 100644 res/drawable-hdpi/hairline_left.9.png delete mode 100644 res/drawable-hdpi/hairline_right.9.png delete mode 100644 res/drawable-hdpi/ic_lock_message_sms.png delete mode 100644 res/drawable-mdpi/hairline_left.9.png delete mode 100644 res/drawable-mdpi/hairline_right.9.png delete mode 100644 res/drawable-xhdpi/hairline_left.9.png delete mode 100644 res/drawable-xhdpi/hairline_right.9.png delete mode 100644 res/layout/contact_list_item.xml delete mode 100644 res/layout/contacts_list_content.xml delete mode 100644 res/layout/main.xml delete mode 100644 res/layout/mms_download_view.xml delete mode 100644 res/layout/send_key_activity.xml diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 1f6ce0fda9..461d52b161 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -36,58 +36,58 @@ diff --git a/res/drawable-hdpi/hairline_left.9.png b/res/drawable-hdpi/hairline_left.9.png deleted file mode 100644 index 5d9c7210ea997b48afeb5253a5211664f5c6bc77..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1105 zcmbVLO-K|`93KlREulk!b$X14DB77fvmdiF?IycBySmkyts89=;V6j4cUbk_>RLjyDKWB$M2@BewdqrJ7U z;a~$rQH|*~IZM{vVd71Wi$qma?s=MT9{&>e0<8{rTxL8t7V-J{QcujGaKedfSkL zI)~bG>QGS?HM-?Eh?FHlU?8l3ve9R{QaMVm@k(UxU9&V;Gr`3uz3x;#(*Y8egFujh zJ{5)_2yqPO4+w&A6!4IPEaX{^_i=*c=OqY1^`VKHqZOpAoT_S(Q!LT!#4Pw)+ zCW@qtEh{$5F_1M3FRnFf7iZBQH#W6)bAvWwv&gju9F^3g&|CwP+-)u784_=#(~eGx zqV&m@I$$6Zr{yS3{xF)ZNstdijuQe<;9)4taUvgwF%HJ#koSv1La1?UhUJ80FclBQ z;#`a%lbq;>sbmPIQVCfWQ$ewYO`9%OOcm91b)s9vid$l(go6}pIXTPft93v}uZ1nQ z*RnyPGYB$@s+-=~E6;kgGII3GNJ}}E0oL*>>6_?7@!z<^;Y27EiY3IDkPOEIe!7a) z{wHTFafbDpzNE$b4LQ^m=^P>hR;8hu>UTuDd}$7~LBmdG~WdZ~FA3 gG~@7J}yFs>g2_e@=|oEPJvy5h&m)hkoI-3H@a&D;-P_=_x|twf4~3tjJCBl zRaNY%peU*;)vRR5x{bW-md)fF9tZwXjT1TCVfWyI>LN8DbF~%(Oie&E}vkbkgg8O33ic`6C8!g)| zqQgND&_D#x5g3G_dYQ zMFkj#5bP{yV#5381j%61K6w}b`jVnx|SDz@FMZTFWupe=7> z+soSyEq8?Jw5l1FFZ<_baT@7K*EZ?p{EEgJ_JQzk+|j5UNk$}DkoZJ2ULRsg zSp9!;#u8^(zd8PDmhutlK!3a1`b1bA9%PY;ami@h`8n1{#%d&`NZI0>`77-ePv}bd z-u&BNotZDx#JI#CtlYJ@zx#IG!su+~6m`9&?p^B8$C;*EhIx=`Qp2Qf$ZE?vZQkw*!f}r3SUVr6xZMpANj-`>g)_ l&Unq_t>KerzhCV*w}IL>(K0@Lx6}W7P^m<#azEZR@*8nUX0-qS diff --git a/res/drawable-hdpi/ic_lock_message_sms.png b/res/drawable-hdpi/ic_lock_message_sms.png deleted file mode 100644 index 6d1029ce9384e24b56d7d062ba4db4e0a61cef96..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 789 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA0wn)(8}a}trX+877l!}s{b%+Ad7K3vk;OpT z1B~5HX4`=T%L*LRfizez!?|}o;XrM&o-U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f21f33e4331b0796f19e98e0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1091 zcmbVLOK8(z91l$97*5g4<_`Li;XqlNFXc90izw39FMLwH4&?KoM&1-p!^s*9+&ZjU06G1W1YN2)$O`5X;WR9o37 zmT)P1P}FQQsQNa+n&}WUMGX$s990`f7>uGZ!;*o(-u~10n6)aF(}B>T*JYJZ2_NA9kr*hL=#U}LNJ|dc9q!jnu#JQ zV`{3yutCU}rXN?s+QWJD$Bi|uz2dZkm^||ADOV%)DEGC%BzNlz`G&+B@sMkfqNo#! ztxcK8!Wl)P$)BKZ=py7|kY)KWjFY_&qwXhr)<`cniWf!T~c8j(>(dvL)#m2T* zu^k{6A|R`3hUK6A@~lLwAlEpJ^ptCxppjqESVJEQ|Hd7Q$u!8B2sibQ7!p zPtF+P4C6P)U(M3GA|2>&S6iPPR)+^!WMW)08V|O7IY7qB%P8?;?c=wruR9-uj%1;} zxO{f*YunGwpDy=28Ckg9pT4$nKHpBM-0?Hkz;!P*-bF8*(4<0t@5>i=Hf_Cfa!LC9eq?!4>)tuLRAt*ryH4GkdHdnb#l!oL9hu!z-tq2MPTbH#-JRoS Sz_y#c{#a*{!^-`{$ob!Cuv*Xn diff --git a/res/drawable-xhdpi/hairline_left.9.png b/res/drawable-xhdpi/hairline_left.9.png deleted file mode 100644 index d2574bc98f4085ac4d203b0b8d1bab444a7cdc8c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1132 zcmbVLO-$2Z7_OKYL=g{$fImr7F8;0k+Oc)56tb=>%s7~1#^FUu`@x#gAKMRCh$aeA zc<|tbn-{JoVhjmtJb6&R!iJg<4>oDPpT5uYyuY_|z1@us z2O9{2Xw38|dA#n!Z)g23{5`}Szk-)mlrExvXBbs94-!ek8G>ZS(neq&YR34bx3GgC zb`G0`A}VIjh`M9ZT4+NDmW$B@(a{ySnqG#89D*aJEm7+)UQwiJNYwdQ7G&KNESWtM z9_*j!E$98qF@XhUGX%@cX19oK zznUnVGA7VmhNS^xSz%lo);`L^-)?Mc?H9&f$mF5#jCne)$8cK>jC1#Iq0kU}BldYF zE{Zm)IQp0cZIn?Y3jd)E(+~ld04&S51D*r%1j`DX43aF6Wxz!RKE>BKw!^Y~I;P5T zPG*xBnP!D3P}6asswqVg)R<7iW^5m6whn8$Cf2QD*?(film|8Bcm>B9t#v@IDn^BU5U}f$8*@h*u{$^yN z>G{vrseQTS`8%Ge`D7iZrcyhPp;k~+b=|VYKzM5E`fADNNKe=CC ze7&}OAN+bacJQ`JsaD-y;^X;|`hilhIh_AYx>s3{ H2Pc04wn%A$ diff --git a/res/drawable-xhdpi/hairline_right.9.png b/res/drawable-xhdpi/hairline_right.9.png deleted file mode 100644 index bb7948566d2249c6879e5746992b8eff4bf6d9e8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1130 zcmbVLTWHfz7>*Z229t@1cqK$p5u2Qou1yoyZEe$RRa>{V>J-6d$>|omTujbvHz(du z5%F13A4DI-i6Wx-ps+WY55ouF1m{p;D1sm&$R6}$Yp254gMs8+@_*m=UoUoK+Uo1p z)KL^wpK6!0WL-wy=A}!>cP+ndh%BpdvJ2Wi zDjNAN+?C!fX|~C#z71P39fGE)rk0AMY9)l}Zq#E~QReHj5r#JOD6>D525BdOdX4r$ z7v%;sd2O(yi8|BLOgB{|LSQ1S(iOAM@}x?XndX(q-oNG;dfEh+qRfm_UFi-wVY`S9 zu^^yt9{Fv;EgLcSsKM%v>V zq$p~iY-{}{vT#a{GUN}d8@dGe2!K#%1OgAj5eP*-4q_0*Dqnqm28zdSS1%E&d2Azg88lb+76WXz!t#DC+CL=s^o97~8XAsLA`2AL{W z|DT+3#2LGJ8vp + android:layout_marginBottom="5dip" + android:text="@string/you_have_received_a_message_from_someone_who_supports_textsecure_encrypted_sessions_would_you_like_to_initiate_a_key_exchange_so_you_can_communicate_securely"/>