From 5b90a9b604993aeb48f77997fcfc6fc38259357d Mon Sep 17 00:00:00 2001 From: Andrew Stadler Date: Thu, 27 May 2010 17:27:59 -0700 Subject: [PATCH] Fix format string ordering * Three format strings had multiple replacement tokens, but the ordering information was missing. * In five languages, the translations reverse the order, and the formatter crashes (because of types mismatching). * This patch adds in the ordering information where needed Bug: 2719864 Change-Id: I084e9c9ddab54901a5142710e8ef986223902c17 --- res/values-ja/strings.xml | 6 +++--- res/values-ko/strings.xml | 6 +++--- res/values-ru/strings.xml | 6 +++--- res/values-tr/strings.xml | 6 +++--- res/values-zh-rCN/strings.xml | 6 +++--- res/values/strings.xml | 20 ++++++++++---------- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml index 0fa37dbee..e768f28bb 100644 --- a/res/values-ja/strings.xml +++ b/res/values-ja/strings.xml @@ -267,8 +267,8 @@ "Exchangeカレンダーを追加しました" "%sを検索中..." - "%sからの結果: %d件" - "%sからの結果: %d件" + "%2$sからの結果: %1$d件" + "%2$sからの結果: %1$d件" - "%sからの結果: 最初の%d件" + "%2$sからの結果: 最初の%1$d件" diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml index a6e7de0cd..84d31b8de 100644 --- a/res/values-ko/strings.xml +++ b/res/values-ko/strings.xml @@ -267,8 +267,8 @@ "Exchange 캘린더 추가됨" "%s 검색 중..." - "%s의 검색결과 %d개" - "%s의 검색결과 %d개" + "%2$s의 검색결과 %1$d개" + "%2$s의 검색결과 %1$d개" - "%s의 처음 %d개 검색결과" + "%2$s의 처음 %1$d개 검색결과" diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml index b91ae04b8..acec2dc9c 100644 --- a/res/values-ru/strings.xml +++ b/res/values-ru/strings.xml @@ -267,8 +267,8 @@ "Календарь Exchange добавлен" "Поиск %s…" - "Результаты с %s (%d)" - "Кол-во результатов: %d с %s" + "Результаты с %2$s (%1$d)" + "Кол-во результатов: %1$d с %2$s" - "Первые результаты с %s (%d)" + "Первые результаты с %2$s (%1$d)" diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml index 107f03c59..05a9f8ebb 100644 --- a/res/values-tr/strings.xml +++ b/res/values-tr/strings.xml @@ -267,8 +267,8 @@ "Exchange takvimi eklendi" "%s aranıyor…" - "%s alanından %d sonuç" - "%s alanından %d sonuç" + "%2$s alanından %1$d sonuç" + "%2$s alanından %1$d sonuç" - "%s alanından ilk %d sonuç" + "%2$s alanından ilk %1$d sonuç" diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml index 836fe36c6..9f8e2890f 100644 --- a/res/values-zh-rCN/strings.xml +++ b/res/values-zh-rCN/strings.xml @@ -267,8 +267,8 @@ "已添加 Exchange 日历" "正在搜索 %s…" - "来自 %s%d 条结果" - "来自 %s%d 条结果" + "来自 %2$s%1$d 条结果" + "来自 %2$s%1$d 条结果" - "来自 %s 的前 %d 条结果" + "来自 %2$s 的前 %1$d 条结果" diff --git a/res/values/strings.xml b/res/values/strings.xml index c51b874fc..95b4e9ee5 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -153,13 +153,13 @@ one or more new messages; e.g, "279 unread (someone@google.com)". --> - %d unread (%s) + %1$d unread (%2$s) - %d unread (%s) + %1$d unread (%2$s) - %d unread (%s) + %1$d unread (%2$s) @@ -242,7 +242,7 @@ Compose Mail - \n\n-------- Original Message --------\nSubject: %s\nFrom: %s\nTo: %s\nCC: %s\n\n + \n\n-------- Original Message --------\nSubject: %1$s\nFrom: %2$s\nTo: %3$s\nCC: %4$s\n\n \n\n%s wrote:\n\n @@ -696,16 +696,16 @@ "5 results from bigcompany.com..." --> - %d result - from %s + %1$d result + from %2$s - %d results - from %s + %1$d results + from %2$s - First %d - results from %s + First %1$d + results from %2$s