From 8aede04bf2660f951eb0408567d923cdef9b0213 Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Fri, 28 May 2010 14:24:49 -0700 Subject: [PATCH] Add positional parameters to aid in i18n 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 | 2 +- samples/SearchableDictionary/res/values/strings.xml | 4 ++-- samples/Wiktionary/res/values/strings.xml | 6 +++--- samples/WiktionarySimple/res/values/strings.xml | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/Development/res/values/strings.xml b/apps/Development/res/values/strings.xml index 1bb65cfd..181c4fa7 100644 --- a/apps/Development/res/values/strings.xml +++ b/apps/Development/res/values/strings.xml @@ -190,7 +190,7 @@ Sync succeeded: %s Already bound to sync adapter No selected sync adapter - Connected to Sync Adapter\n\tauthority: %s\n\taccount type: %s + Connected to Sync Adapter\n\tauthority: %1$s\n\taccount type: %2$s Not connected to a sync adapter Bind failed Waiting for service to be connected... diff --git a/samples/SearchableDictionary/res/values/strings.xml b/samples/SearchableDictionary/res/values/strings.xml index 569e1d92..ee628ced 100644 --- a/samples/SearchableDictionary/res/values/strings.xml +++ b/samples/SearchableDictionary/res/values/strings.xml @@ -38,8 +38,8 @@ - %d result for \"%s\": - %d results for \"%s\": + %1$d result for \"%2$s\": + %1$d results for \"%2$s\": diff --git a/samples/Wiktionary/res/values/strings.xml b/samples/Wiktionary/res/values/strings.xml index 38d99376..ace44289 100644 --- a/samples/Wiktionary/res/values/strings.xml +++ b/samples/Wiktionary/res/values/strings.xml @@ -19,9 +19,9 @@ Example of a fast Wiktionary browser and Word-of-day widget "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" - "%s/%s (Linux; Android)" - "Wiktionary:Word of the day/%s %s" - "http://en.wiktionary.org/wiki/%s" + "%1$s/%2$s (Linux; Android)" + "Wiktionary:Word of the day/%1$s %2$s" + "http://en.wiktionary.org/wiki/%s" Wiktionary diff --git a/samples/WiktionarySimple/res/values/strings.xml b/samples/WiktionarySimple/res/values/strings.xml index 65e44cb8..7c765857 100644 --- a/samples/WiktionarySimple/res/values/strings.xml +++ b/samples/WiktionarySimple/res/values/strings.xml @@ -17,9 +17,9 @@ Wiktionary simple example - "%s/%s (Linux; Android)" - "Wiktionary:Word of the day/%s %s" - "http://en.wiktionary.org/wiki/%s" + "%1$s/%2$s (Linux; Android)" + "Wiktionary:Word of the day/%1$s %2$s" + "http://en.wiktionary.org/wiki/%s" Wiktionary simple -- 2.11.0