summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Fischer <>2009-03-24 17:53:52 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-24 17:53:52 -0700
commit8963b29db97943e82f8780b3ef65a40d788634b7 (patch)
tree51926bedc481b47d31136f118ec91e7ba5b5fff1
parent7ddab4c4a8fb866577f0cfe07f325d68b9a7b7c0 (diff)
downloadpackages_apps_Browser-8963b29db97943e82f8780b3ef65a40d788634b7.zip
packages_apps_Browser-8963b29db97943e82f8780b3ef65a40d788634b7.tar.gz
packages_apps_Browser-8963b29db97943e82f8780b3ef65a40d788634b7.tar.bz2
Automated import from //branches/master/...@140538,140538
-rw-r--r--res/layout/browser_find.xml10
-rw-r--r--res/values-cs/strings.xml2
-rw-r--r--res/values-de/strings.xml2
-rw-r--r--res/values-es/strings.xml2
-rw-r--r--res/values-fr/strings.xml2
-rw-r--r--res/values-it/strings.xml2
-rw-r--r--res/values-ja/strings.xml2
-rw-r--r--res/values-ko/strings.xml2
-rw-r--r--res/values-nb/strings.xml2
-rw-r--r--res/values-nl/strings.xml2
-rw-r--r--res/values-pl/strings.xml2
-rw-r--r--res/values-ru/strings.xml2
-rw-r--r--res/values-zh-rCN/strings.xml2
-rw-r--r--res/values-zh-rTW/strings.xml2
-rw-r--r--res/values/strings.xml19
-rw-r--r--src/com/android/browser/FindDialog.java13
16 files changed, 22 insertions, 46 deletions
diff --git a/res/layout/browser_find.xml b/res/layout/browser_find.xml
index 000799f..7a77152 100644
--- a/res/layout/browser_find.xml
+++ b/res/layout/browser_find.xml
@@ -62,16 +62,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
- android:text="@string/zero"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="?android:attr/textColorSecondaryInverse"
- />
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginRight="3dip"
- android:layout_gravity="right"
- android:text="@string/matches_found"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorSecondaryInverse"
/>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index ee576d6..11acc71 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -27,8 +27,6 @@
<string name="action">"Přihlásit se"</string>
<string name="cancel">"Zrušit"</string>
<string name="ok">"OK"</string>
- <string name="matches_found">" shod"</string>
- <string name="zero">"Ne"</string>
<string name="page_info">"Informace o stránce"</string>
<string name="page_info_view">"Zobrazit informace o stránce"</string>
<string name="page_info_address">"Adresa:"</string>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 89b46b9..0a06679 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -27,8 +27,6 @@
<string name="action">"Anmelden"</string>
<string name="cancel">"Abbrechen"</string>
<string name="ok">"OK"</string>
- <string name="matches_found">" Treffer"</string>
- <string name="zero">"Nein"</string>
<string name="page_info">"Seiten-Info"</string>
<string name="page_info_view">"Seiten-Info anzeigen"</string>
<string name="page_info_address">"Adresse:"</string>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 321faf5..bed9bd3 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -27,8 +27,6 @@
<string name="action">"Acceder"</string>
<string name="cancel">"Cancelar"</string>
<string name="ok">"Aceptar"</string>
- <string name="matches_found">" coincidencias"</string>
- <string name="zero">"No"</string>
<string name="page_info">"Información de página"</string>
<string name="page_info_view">"Ver información de página"</string>
<string name="page_info_address">"Dirección:"</string>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index 375583e..c97a4f6 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -27,8 +27,6 @@
<string name="action">"Se connecter"</string>
<string name="cancel">"Annuler"</string>
<string name="ok">"OK"</string>
- <string name="matches_found">" résultat(s) correspondant(s )"</string>
- <string name="zero">"Non"</string>
<string name="page_info">"Infos sur la page"</string>
<string name="page_info_view">"Afficher les infos sur la page"</string>
<string name="page_info_address">"Adresse :"</string>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index c44ed3e..500d685 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -27,8 +27,6 @@
<string name="action">"Accedi"</string>
<string name="cancel">"Annulla"</string>
<string name="ok">"OK"</string>
- <string name="matches_found">" corrispondenze"</string>
- <string name="zero">"No"</string>
<string name="page_info">"Info pagina"</string>
<string name="page_info_view">"Visualizza info pagina"</string>
<string name="page_info_address">"Indirizzo:"</string>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index f14953b..5c3951d 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -27,8 +27,6 @@
<string name="action">"ログイン"</string>
<string name="cancel">"キャンセル"</string>
<string name="ok">"OK"</string>
- <string name="matches_found">" 件一致"</string>
- <string name="zero">"いいえ"</string>
<string name="page_info">"ページ情報"</string>
<string name="page_info_view">"ページ情報を表示"</string>
<string name="page_info_address">"アドレス:"</string>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index bba2bf8..00121b6 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -27,8 +27,6 @@
<string name="action">"로그인"</string>
<string name="cancel">"취소"</string>
<string name="ok">"확인"</string>
- <string name="matches_found">" 개 일치"</string>
- <string name="zero">"없음"</string>
<string name="page_info">"페이지 정보"</string>
<string name="page_info_view">"페이지 정보 보기"</string>
<string name="page_info_address">"주소:"</string>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index 4fb4d4d..c06993c 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -27,8 +27,6 @@
<string name="action">"Logg inn"</string>
<string name="cancel">"Avbryt"</string>
<string name="ok">"OK"</string>
- <string name="matches_found">" treff"</string>
- <string name="zero">"Ingen"</string>
<string name="page_info">"Sideinformasjon"</string>
<string name="page_info_view">"Vis sideinformasjon"</string>
<string name="page_info_address">"Adresse:"</string>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 7fccab8..2b1aefb 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -27,8 +27,6 @@
<string name="action">"Aanmelden"</string>
<string name="cancel">"Annuleren"</string>
<string name="ok">"OK"</string>
- <string name="matches_found">" overeenkomsten"</string>
- <string name="zero">"Nee"</string>
<string name="page_info">"Pagina-informatie"</string>
<string name="page_info_view">"Pagina-informatie weergeven"</string>
<string name="page_info_address">"Adres:"</string>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 9d1130f..ec3b746 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -27,8 +27,6 @@
<string name="action">"Zaloguj się"</string>
<string name="cancel">"Anuluj"</string>
<string name="ok">"OK"</string>
- <string name="matches_found">" dopasowania"</string>
- <string name="zero">"Nie"</string>
<string name="page_info">"Informacje o stronie"</string>
<string name="page_info_view">"Informacje o stronie"</string>
<string name="page_info_address">"Adres:"</string>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 32af560..ddba702 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -27,8 +27,6 @@
<string name="action">"Войти"</string>
<string name="cancel">"Отмена"</string>
<string name="ok">"ОК"</string>
- <string name="matches_found">" совпадений(я)"</string>
- <string name="zero">"Нет"</string>
<string name="page_info">"Сведения о странице"</string>
<string name="page_info_view">"Просмотреть сведения о странице"</string>
<string name="page_info_address">"Адрес:"</string>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 2ee80c2..be48e36 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -27,8 +27,6 @@
<string name="action">"登录"</string>
<string name="cancel">"取消"</string>
<string name="ok">"确定"</string>
- <string name="matches_found">" 匹配项"</string>
- <string name="zero">"否"</string>
<string name="page_info">"页面信息"</string>
<string name="page_info_view">"查看页面信息"</string>
<string name="page_info_address">"地址:"</string>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index 9b6c675..96658db 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -27,8 +27,6 @@
<string name="action">"登入"</string>
<string name="cancel">"取消"</string>
<string name="ok">"確定"</string>
- <string name="matches_found">" 個符合項目"</string>
- <string name="zero">"否"</string>
<string name="page_info">"頁面資訊"</string>
<string name="page_info_view">"檢視頁面資訊"</string>
<string name="page_info_address">"位址:"</string>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 0dcf1f2..98142ac 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -44,13 +44,18 @@
<!-- Label for a confirm button. Used in multiple contexts. -->
<string name="ok">OK</string>
- <!--The find dialog -->
- <!-- Displayed on the Find Dialog, stating "X matches" where X is the
- number of matches found in the current page -->
- <string name="matches_found">\u0020matches</string>
- <!-- Displayed on the Find Dialog, stating that there are "zero
- matches" -->
- <string name="zero">No</string>
+ <!-- Displayed on the Find dialog to display the number of matches
+ found in the current page. -->
+ <plurals name="matches_found">
+ <!-- Case of no matches -->
+ <item quantity="zero">No matches</item>
+ <!-- Case of one match -->
+ <item quantity="one">1 match</item>
+ <!-- Case of "few" (two) matches -->
+ <item quantity="few"><xliff:g id="number" example="2">%d</xliff:g> matches</item>
+ <!-- Case of several matches -->
+ <item quantity="other"><xliff:g id="number" example="137">%d</xliff:g> matches</item>
+ </plurals>
<!-- Menu item -->
<string name="page_info">Page info</string>
diff --git a/src/com/android/browser/FindDialog.java b/src/com/android/browser/FindDialog.java
index 43cd1c4..6e9574c 100644
--- a/src/com/android/browser/FindDialog.java
+++ b/src/com/android/browser/FindDialog.java
@@ -179,7 +179,7 @@ import android.widget.TextView;
Spannable span = (Spannable) mEditText.getText();
span.setSpan(this, 0, span.length(),
Spannable.SPAN_INCLUSIVE_INCLUSIVE);
- mMatches.setText(R.string.zero);
+ setMatchesFound(0);
disableButtons();
}
@@ -206,11 +206,11 @@ import android.widget.TextView;
} else {
mMatchesView.setVisibility(View.VISIBLE);
int found = mWebView.findAll(find.toString());
- mMatches.setText(Integer.toString(found));
+ setMatchesFound(found);
if (found < 2) {
disableButtons();
if (found == 0) {
- mMatches.setText(R.string.zero);
+ setMatchesFound(0);
}
} else {
mPrevButton.setFocusable(true);
@@ -221,6 +221,13 @@ import android.widget.TextView;
}
}
+ private void setMatchesFound(int found) {
+ String template = mBrowserActivity.getResources().
+ getQuantityString(R.plurals.matches_found, found, found);
+
+ mMatches.setText(template);
+ }
+
public void afterTextChanged(Editable s) {
}
}