OSDN Git Service

Add positional parameters to aid in i18n
authorKenny Root <kroot@google.com>
Fri, 28 May 2010 21:24:49 +0000 (14:24 -0700)
committerKenny Root <kroot@google.com>
Tue, 1 Jun 2010 18:50:47 +0000 (11:50 -0700)
Different languages might have different word orders, so add in
positional parameters for strings that have more than one substitution.

Change-Id: Ie9fc74eb0a22471b272e65c6cd521f1518b322d1

apps/Development/res/values/strings.xml
samples/SearchableDictionary/res/values/strings.xml
samples/Wiktionary/res/values/strings.xml
samples/WiktionarySimple/res/values/strings.xml

index 1bb65cf..181c4fa 100644 (file)
     <string name="status_sync_succeeded_format">Sync succeeded: %s</string>
     <string name="status_already_bound">Already bound to sync adapter</string>
     <string name="status_sync_adapter_not_selected">No selected sync adapter</string>
-    <string name="binding_connected_format">Connected to Sync Adapter\n\tauthority: %s\n\taccount type: %s</string>
+    <string name="binding_connected_format">Connected to Sync Adapter\n\tauthority: %1$s\n\taccount type: %2$s</string>
     <string name="binding_not_connected">Not connected to a sync adapter</string>
     <string name="binding_bind_failed">Bind failed</string>
     <string name="binding_waiting_for_connection">Waiting for service to be connected...</string>
index 569e1d9..ee628ce 100644 (file)
@@ -38,8 +38,8 @@
 
     <!-- Shown above search results when we receive a search request. -->
     <plurals name="search_results">
-      <item quantity="one">%d result for \"%s\": </item>
-      <item quantity="other">%d results for \"%s\": </item>
+      <item quantity="one">%1$d result for \"%2$s\": </item>
+      <item quantity="other">%1$d results for \"%2$s\": </item>
     </plurals>
 
     <!-- Search failure message. -->
index 38d9937..ace4428 100644 (file)
@@ -19,9 +19,9 @@
     <string name="app_descrip">Example of a fast Wiktionary browser and Word-of-day widget</string>
     <string name="app_credits">"All dictionary content provided by Wiktionary under a GFDL license.  http://en.wiktionary.org\n\nIcon derived from Tango Desktop Project under a public domain license.  http://tango.freedesktop.org"</string>
 
-    <string name="template_user_agent">"%s/%s (Linux; Android)"</string>
-    <string name="template_wotd_title">"Wiktionary:Word of the day/%s %s"</string>
-    <string name="template_define_url">"http://en.wiktionary.org/wiki/%s"</string>
+    <string name="template_user_agent" translatable="false">"%1$s/%2$s (Linux; Android)"</string>
+    <string name="template_wotd_title">"Wiktionary:Word of the day/%1$s %2$s"</string>
+    <string name="template_define_url" translatable="false">"http://en.wiktionary.org/wiki/%s"</string>
 
     <string name="widget_name">Wiktionary</string>
 
index 65e44cb..7c76585 100644 (file)
@@ -17,9 +17,9 @@
 <resources>
     <string name="app_name">Wiktionary simple example</string>
 
-    <string name="template_user_agent">"%s/%s (Linux; Android)"</string>
-    <string name="template_wotd_title">"Wiktionary:Word of the day/%s %s"</string>
-    <string name="template_define_url">"http://en.wiktionary.org/wiki/%s"</string>
+    <string name="template_user_agent" translatable="false">"%1$s/%2$s (Linux; Android)"</string>
+    <string name="template_wotd_title">"Wiktionary:Word of the day/%1$s %2$s"</string>
+    <string name="template_define_url" translatable="false">"http://en.wiktionary.org/wiki/%s"</string>
 
     <string name="widget_name">Wiktionary simple</string>