Add support for %t (type) in custom search URL

git-svn-id: https://zxing.googlecode.com/svn/trunk@2124 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2012-01-20 18:48:10 +00:00
parent d75a7467f9
commit b8b62c6e30
30 changed files with 34 additions and 29 deletions

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">المسح الضوئي وحفظها بشكل مستمر العديد من الرموز الشريطية</string>
<string name="preferences_bulk_mode_title">جل وضع المسح الضوئي</string>
<string name="preferences_copy_to_clipboard_title">نسخ إلى الحافظة</string>
<string name="preferences_custom_product_search_summary" formatted="false">استخدم %s كعنصر نائب لمعرف المنتج</string>
<string name="preferences_custom_product_search_summary" formatted="false">التبديلات : s٪ = المحتويات ، f٪ = الشكل ، اكتب t٪ =</string>
<string name="preferences_custom_product_search_title">عنوان بحث مخصص</string>
<string name="preferences_decode_1D_title">فك الرموز الشريطية 1D</string>
<string name="preferences_decode_Data_Matrix_title">فك رموز البيانات ماتريكس</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">Сканирай и запомняй множество баркодове без прекъсване</string>
<string name="preferences_bulk_mode_title">Масово сканиране</string>
<string name="preferences_copy_to_clipboard_title">Копиране в клипборда</string>
<string name="preferences_custom_product_search_summary" formatted="false">Използвайте %s за идентификатора и %f за формата</string>
<string name="preferences_custom_product_search_summary" formatted="false">Използвайте: %s = съдържанието,%f = форматa, %t = тип</string>
<string name="preferences_custom_product_search_title">Потребителски адрес за търсене</string>
<string name="preferences_decode_1D_title">1D Баркодове</string>
<string name="preferences_decode_Data_Matrix_title">Data Matrix</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">Escaneja i desa molts codis de barres de forma contínua</string>
<string name="preferences_bulk_mode_title">Mode d\'escaneig en bloc</string>
<string name="preferences_copy_to_clipboard_title">Copia al porta-retalls</string>
<string name="preferences_custom_product_search_summary" formatted="false">Useu %s com a indicador de l\'identificador del producte, i %f per al format</string>
<string name="preferences_custom_product_search_summary" formatted="false">Substitucions: %s = contingut, %f = format, %t = tipus</string>
<string name="preferences_custom_product_search_title">URL de cerca personalitzat</string>
<string name="preferences_decode_1D_title">Codis de barres 1D</string>
<string name="preferences_decode_Data_Matrix_title">Matriu de dades</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">Skenování více čárových kódú bez přerušení, vhodné na dávkové zpracování velkého množství čárových kódú</string>
<string name="preferences_bulk_mode_title">Dávkový režim skenování</string>
<string name="preferences_copy_to_clipboard_title">Kopírovat do schránky.</string>
<string name="preferences_custom_product_search_summary" formatted="false">Použijte %s jako zástupný symbol pro ID produktu, a %f pro formát</string>
<string name="preferences_custom_product_search_summary" formatted="false">Použijte: %s = obsah, %f = formát, %t = typ</string>
<string name="preferences_custom_product_search_title">Vlastní vyhledávání URL</string>
<string name="preferences_decode_1D_title">1D kódy</string>
<string name="preferences_decode_Data_Matrix_title">Data Matrix</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">Scan og gem mange stregkoder uden afbrydelser</string>
<string name="preferences_bulk_mode_title">Massescanningstilstand</string>
<string name="preferences_copy_to_clipboard_title">Kopiér til udklipsholder</string>
<string name="preferences_custom_product_search_summary" formatted="false">Brug %s som en pladsholder for produkt-id, og %f for format</string>
<string name="preferences_custom_product_search_summary" formatted="false">Udskiftninger: %s = indhold, %f = format, %t = typen</string>
<string name="preferences_custom_product_search_title">Brugerdefineret søge-URL</string>
<string name="preferences_decode_1D_title">Afkod 1D-stregkoder</string>
<string name="preferences_decode_Data_Matrix_title">Afkod Data Matrix</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">Scannt und speichert mehrere Barcodes nacheinander</string>
<string name="preferences_bulk_mode_title">Bulk-Scan-Modus</string>
<string name="preferences_copy_to_clipboard_title">In Zwischenablage kopieren</string>
<string name="preferences_custom_product_search_summary" formatted="false">Verwenden Sie %s als Platzhalter für die Produkt-ID und %f für das Format</string>
<string name="preferences_custom_product_search_summary" formatted="false">Auswechslungen: %s = Inhalt, %f = Format,% t = Typ</string>
<string name="preferences_custom_product_search_title">Eigene Such-URL</string>
<string name="preferences_decode_1D_title">1D Barcodes</string>
<string name="preferences_decode_Data_Matrix_title">Data Matrix</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">Σκανάρετε και αποθηκεύστε πολλά barcodes συνεχώς</string>
<string name="preferences_bulk_mode_title">Λειτουργία μαζικού σκαναρίσματος</string>
<string name="preferences_copy_to_clipboard_title">Αντιγραφή στο πρόχειρο</string>
<string name="preferences_custom_product_search_summary" formatted="false">Βάλτε %s σαν σύμβολο κράτησης θέσης για το ID προϊόντος, και %f για τη διαμόρφωση</string>
<string name="preferences_custom_product_search_summary" formatted="false">Αντικαταστάσεις: %s = περιεχόμενο, %f = μορφή, %t = τύπος</string>
<string name="preferences_custom_product_search_title">Σύνθετη αναζήτηση</string>
<string name="preferences_decode_1D_title">1D barcodes</string>
<string name="preferences_decode_Data_Matrix_title">Data Matrix</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">Escanear y guardar muchos códigos de barras de forma continua</string>
<string name="preferences_bulk_mode_title">Modo masivo de escaneo</string>
<string name="preferences_copy_to_clipboard_title">Copiar al portapapeles</string>
<string name="preferences_custom_product_search_summary" formatted="false">Use %s como un marcador de posición para el identificador del producto, y %f para el formato.</string>
<string name="preferences_custom_product_search_summary" formatted="false">Sustituciones: %s = contenido, %f = formato, %t = tipo</string>
<string name="preferences_custom_product_search_title">Búsqueda de productos con URL personalizada</string>
<string name="preferences_decode_1D_title">Códigos de barras 1D</string>
<string name="preferences_decode_Data_Matrix_title">Data Matrix</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">Skannaa ja tallenna monet viivakoodeja jatkuvasti</string>
<string name="preferences_bulk_mode_title">Bulk skannaustilassa</string>
<string name="preferences_copy_to_clipboard_title">Kopioi leikepöydälle</string>
<string name="preferences_custom_product_search_summary" formatted="false">Käytä %s paikkana tuotetunnukselle tunnus ja %f muoto</string>
<string name="preferences_custom_product_search_summary" formatted="false">Korvaaminen: %s = sisältö, %f = formaatti, %t = tyyppi</string>
<string name="preferences_custom_product_search_title">Mukautettu hakukone</string>
<string name="preferences_decode_1D_title">1D viivakoodeja</string>
<string name="preferences_decode_Data_Matrix_title">Data Matrix</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">Scanner et enregistrer plusieurs codes-barres d\'affilée</string>
<string name="preferences_bulk_mode_title">Mode de lecture en rafale</string>
<string name="preferences_copy_to_clipboard_title">Copier dans le presse papier</string>
<string name="preferences_custom_product_search_summary" formatted="false">Utiliser %s à la place de l\'identifiant du produit, et %f pour le format</string>
<string name="preferences_custom_product_search_summary" formatted="false">Remplacements: %s = contenu, %f = le format, %t = type</string>
<string name="preferences_custom_product_search_title">URL de recherche personnalisée</string>
<string name="preferences_decode_1D_title">Unidimensionnels (1D)</string>
<string name="preferences_decode_Data_Matrix_title">Data Matrix</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">סורק ושומר ברקודים באופן רציף</string>
<string name="preferences_bulk_mode_title">מצב סריקה מרובה</string>
<string name="preferences_copy_to_clipboard_title">העתק ללוח</string>
<string name="preferences_custom_product_search_summary" formatted="false">השתמש ב- %s כמציין מיקום עבור מזהה המוצר, וב- %f עבור הפורמט</string>
<string name="preferences_custom_product_search_summary" formatted="false">החלפות: s% = התוכן, f% = הפורמט, t% = סוג</string>
<string name="preferences_custom_product_search_title">כתובת לחיפוש מותאם אישית</string>
<string name="preferences_decode_1D_title">ברקודים חד מימדיים</string>
<string name="preferences_decode_Data_Matrix_title">מטריצת נתונים</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">स्कैन और कई बारकोड लगातार बचाने के</string>
<string name="preferences_bulk_mode_title">थोक स्कैन मोड</string>
<string name="preferences_copy_to_clipboard_title">क्लिपबोर्ड पर कॉपी</string>
<string name="preferences_custom_product_search_summary" formatted="false">उत्पाद ID के लिए एक प्लेसहोल्डर के रूप में% का प्रयोग करें, और स्वरूप के लिए% च</string>
<string name="preferences_custom_product_search_summary" formatted="false">स्थानापन्न: %s = सामग्री, %f = प्रारूप, %t = टाइप</string>
<string name="preferences_custom_product_search_title">कस्टम खोज यूआरएल</string>
<string name="preferences_decode_1D_title">1D बारकोड</string>
<string name="preferences_decode_Data_Matrix_title">डाटा मैट्रिक्स</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">Több vonalkód folyamatos szkennelése és mentése</string>
<string name="preferences_bulk_mode_title">Tömeges beolvasás</string>
<string name="preferences_copy_to_clipboard_title">Másolás a vágólapra</string>
<string name="preferences_custom_product_search_summary" formatted="false">Használjon %s-t a termék-azonosító helyén, %f-et pedig a formátum helyén</string>
<string name="preferences_custom_product_search_summary" formatted="false">Használjon: %s = tartalom, %f = formátum, %t = típus</string>
<string name="preferences_custom_product_search_title">Egyedi kereső URL</string>
<string name="preferences_decode_1D_title">1D vonalkódok</string>
<string name="preferences_decode_Data_Matrix_title">Data Matrix</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">Pindai dan simpan beberapa barcode terus-menerus</string>
<string name="preferences_bulk_mode_title">Mode pemindaian bulk</string>
<string name="preferences_copy_to_clipboard_title">Salin ke clipboard</string>
<string name="preferences_custom_product_search_summary" formatted="false">Gunakan %s sebagai tempat ID produk, dan %f untuk format</string>
<string name="preferences_custom_product_search_summary" formatted="false">Substitusi: %s = isi, %f = format, %t = jenis</string>
<string name="preferences_custom_product_search_title">Pencarian URL kustom</string>
<string name="preferences_decode_1D_title">1D barcode</string>
<string name="preferences_decode_Data_Matrix_title">Data Matriks</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">Scansiona e salva diversi codici a barre in sequenza</string>
<string name="preferences_bulk_mode_title">Modalità scansione di gruppo</string>
<string name="preferences_copy_to_clipboard_title">Copia negli appunti</string>
<string name="preferences_custom_product_search_summary" formatted="false">Utilizza %s come segnalibro per l\'ID del prodotto e %f per il formato</string>
<string name="preferences_custom_product_search_summary" formatted="false">Sostituzioni: %s = contenuti, %f = formato, %t = tipo</string>
<string name="preferences_custom_product_search_title">URL ricerca personalizzata</string>
<string name="preferences_decode_1D_title">Codice a barre 1D</string>
<string name="preferences_decode_Data_Matrix_title">Matrice dati</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">סורק ושומר ברקודים באופן רציף</string>
<string name="preferences_bulk_mode_title">מצב סריקה מרובה</string>
<string name="preferences_copy_to_clipboard_title">העתק ללוח</string>
<string name="preferences_custom_product_search_summary" formatted="false">השתמש ב- %s כמציין מיקום עבור מזהה המוצר, וב- %f עבור הפורמט</string>
<string name="preferences_custom_product_search_summary" formatted="false">החלפות: s% = התוכן, f% = הפורמט, t% = סוג</string>
<string name="preferences_custom_product_search_title">כתובת לחיפוש מותאם אישית</string>
<string name="preferences_decode_1D_title">ברקודים חד מימדיים</string>
<string name="preferences_decode_Data_Matrix_title">מטריצת נתונים</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">多くのバーコード連続してスキャンし、保存する</string>
<string name="preferences_bulk_mode_title">連続モードでのスキャン</string>
<string name="preferences_copy_to_clipboard_title">クリップボードにコピーする</string>
<string name="preferences_custom_product_search_summary" formatted="false">URL中の「%s」はスキャン結果に置換されます</string>
<string name="preferences_custom_product_search_summary" formatted="false">置換s=コンテンツ、f=フォーマット、t=タイプ</string>
<string name="preferences_custom_product_search_title">カスタム商品サーチ URL</string>
<string name="preferences_decode_1D_title">1Dバーコードを読み取る</string>
<string name="preferences_decode_Data_Matrix_title">データマトリックスコードを読み取る</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">다수의 바코드를 스캔하고 저장합니다.</string>
<string name="preferences_bulk_mode_title">일괄 스캔 모드</string>
<string name="preferences_copy_to_clipboard_title">복사하기</string>
<string name="preferences_custom_product_search_summary" formatted="false">%s를 제품 ID로, %f를 포맷으로 입력하여 주세요.</string>
<string name="preferences_custom_product_search_summary" formatted="false">자리 표시자: %s = 내용, %f = 포맷, %t = 유형</string>
<string name="preferences_custom_product_search_title">사용자 지정 검색 주소</string>
<string name="preferences_decode_1D_title">1차원 바코드를 읽기</string>
<string name="preferences_decode_Data_Matrix_title">데이터 행렬(Data Matrix)을 해석하기</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">Scan continue barcodes en sla ze allemaal op</string>
<string name="preferences_bulk_mode_title">Bulk scan modus</string>
<string name="preferences_copy_to_clipboard_title">Kopieer naar plakbord</string>
<string name="preferences_custom_product_search_summary" formatted="false">Gebruik %s voor de plaats van het product ID en %f voor het formaat</string>
<string name="preferences_custom_product_search_summary" formatted="false">Vervangingen: %s = inhoud, %f = formaat, %t = type</string>
<string name="preferences_custom_product_search_title">Zoek aangepaste URL</string>
<string name="preferences_decode_1D_title">1D barcodes</string>
<string name="preferences_decode_Data_Matrix_title">Data Matrix</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">Skanowanie i zapisywanie wielu kodów kreskowych ciągle</string>
<string name="preferences_bulk_mode_title">Luzem tryb skanowania</string>
<string name="preferences_copy_to_clipboard_title">Kopiuj do schowka</string>
<string name="preferences_custom_product_search_summary" formatted="false">Użyj %s jako zamiennik dla ID produktu, a dla formatu %f</string>
<string name="preferences_custom_product_search_summary" formatted="false">Zastępstwa: %s = zawartość, %f = format, %t = typ</string>
<string name="preferences_custom_product_search_title">Własny URL wyszukiwania</string>
<string name="preferences_decode_1D_title">Dekoduj kody 1D</string>
<string name="preferences_decode_Data_Matrix_title">Dekoduj Decode Matrix</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">Ler e guardar códigos de barras continuamente</string>
<string name="preferences_bulk_mode_title">Modo em massa</string>
<string name="preferences_copy_to_clipboard_title">Copiar para a área de transferência</string>
<string name="preferences_custom_product_search_summary" formatted="false">Usar %s como espaço reservado para a identificação do produto, e %f para o formato</string>
<string name="preferences_custom_product_search_summary" formatted="false">Substituições: %s = conteúdos, %f = formato, %t = tipo</string>
<string name="preferences_custom_product_search_title">Pesquisa personalizada de URL</string>
<string name="preferences_decode_1D_title">Código de barras 1D</string>
<string name="preferences_decode_Data_Matrix_title">Data Matrix</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">Постоянно сканировать и сохранять штрих-коды</string>
<string name="preferences_bulk_mode_title">Массовое сканирование</string>
<string name="preferences_copy_to_clipboard_title">Копировать в буфер обмена</string>
<string name="preferences_custom_product_search_summary" formatted="false">%s будет заменён на ID товара, и %f на формат</string>
<string name="preferences_custom_product_search_summary" formatted="false">Замены: %s = содержание, %f = формат, %t = тип</string>
<string name="preferences_custom_product_search_title">URL пользовательского поиска</string>
<string name="preferences_decode_1D_title">Распознавать линейные штрих-коды</string>
<string name="preferences_decode_Data_Matrix_title">Распознавать Data Matrix</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">Skenovať a ukladať veľa čiarových kódov bez prerušenia</string>
<string name="preferences_bulk_mode_title">Hromadný režim skenovania</string>
<string name="preferences_copy_to_clipboard_title">Kopírovať do schránky</string>
<string name="preferences_custom_product_search_summary" formatted="false">Použiť ako vlastníka pre ID produktu, a pre formát</string>
<string name="preferences_custom_product_search_summary" formatted="false">Striedanie: %s = obsah, %f = format, %t = typ</string>
<string name="preferences_custom_product_search_title">Vlastné vyhľadávanie URL</string>
<string name="preferences_decode_1D_title">1D čiarové kódy</string>
<string name="preferences_decode_Data_Matrix_title">Dáta Matrix</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">Beri in shrani več črtnih kod zaporedoma</string>
<string name="preferences_bulk_mode_title">Branje črtnih kod na debelo</string>
<string name="preferences_copy_to_clipboard_title">Kopiraj v beležnico</string>
<string name="preferences_custom_product_search_summary" formatted="false">Uporabi %s kot prostor za ID produkta ter %f za format</string>
<string name="preferences_custom_product_search_summary" formatted="false">Zamenjave: %s = vsebin, %f = format, %t = vrsta</string>
<string name="preferences_custom_product_search_title">URL za iskanje po meri</string>
<string name="preferences_decode_1D_title">1D črtno kodo</string>
<string name="preferences_decode_Data_Matrix_title">Data Matrix</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">Skanna och spara många streckkoder kontinuerligt</string>
<string name="preferences_bulk_mode_title">Bulk skanningsläget</string>
<string name="preferences_copy_to_clipboard_title">Kopiera till klippbordet</string>
<string name="preferences_custom_product_search_summary" formatted="false">Skriv %s där produktens ID ska placeras, och %f för format</string>
<string name="preferences_custom_product_search_summary" formatted="false">Ersättare: %s = innehåll, %f = format, %t = typ</string>
<string name="preferences_custom_product_search_title">Anpassad sök-URL</string>
<string name="preferences_decode_1D_title">1D steckkod</string>
<string name="preferences_decode_Data_Matrix_title">Data Matrix</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">Birden fazla barkodu toplu olarak taramak ve kaydetmek için</string>
<string name="preferences_bulk_mode_title">Toplu tarama modu</string>
<string name="preferences_copy_to_clipboard_title">Panoya kopyala</string>
<string name="preferences_custom_product_search_summary" formatted="false">Yer tutucu olarak ürün kimliği için %s, biçim için %f öğesini kullan</string>
<string name="preferences_custom_product_search_summary" formatted="false">Yerine Koyma: %s = içeriği, %f = biçim, %t = tip</string>
<string name="preferences_custom_product_search_title">Özel arama adresi</string>
<string name="preferences_decode_1D_title">1D barkodları</string>
<string name="preferences_decode_Data_Matrix_title">Data Matrix</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">连续扫描并保存多个条形码</string>
<string name="preferences_bulk_mode_title">批量扫描模式</string>
<string name="preferences_copy_to_clipboard_title">复制到剪切板</string>
<string name="preferences_custom_product_search_summary" formatted="false">使用%s作为产品ID占位符</string>
<string name="preferences_custom_product_search_summary" formatted="false">替换s=内容f=格式t=类型</string>
<string name="preferences_custom_product_search_title">自定义搜索网址</string>
<string name="preferences_decode_1D_title">扫描 一维条码</string>
<string name="preferences_decode_Data_Matrix_title">扫描 DM码</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">連續掃描並儲存多個條碼</string>
<string name="preferences_bulk_mode_title">大量掃描模式</string>
<string name="preferences_copy_to_clipboard_title">複製到剪貼簿</string>
<string name="preferences_custom_product_search_summary" formatted="false">請在網址上填寫 %s 做為產品編號,%f 做為格式</string>
<string name="preferences_custom_product_search_summary" formatted="false">替換s=內容f=格式t=類型</string>
<string name="preferences_custom_product_search_title">自訂搜尋網址</string>
<string name="preferences_decode_1D_title">解碼一維條碼</string>
<string name="preferences_decode_Data_Matrix_title">解碼 Data Matrix 條碼</string>

View file

@ -99,7 +99,7 @@
<string name="preferences_bulk_mode_summary">Scan and save many barcodes continuously</string>
<string name="preferences_bulk_mode_title">Bulk scan mode</string>
<string name="preferences_copy_to_clipboard_title">Copy to clipboard</string>
<string name="preferences_custom_product_search_summary" formatted="false">Use %s as a placeholder for the product ID, and %f for format</string>
<string name="preferences_custom_product_search_summary" formatted="false">Substitutions: %s = contents, %f = format, %t = type</string>
<string name="preferences_custom_product_search_title">Custom search URL</string>
<string name="preferences_decode_1D_title">1D barcodes</string>
<string name="preferences_decode_Data_Matrix_title">Data Matrix</string>

View file

@ -25,6 +25,7 @@ import com.google.zxing.client.android.R;
import com.google.zxing.client.android.book.SearchBookContentsActivity;
import com.google.zxing.client.result.ParsedResult;
import com.google.zxing.client.result.ParsedResultType;
import com.google.zxing.client.result.ResultParser;
import android.app.Activity;
import android.app.AlertDialog;
@ -568,6 +569,10 @@ public abstract class ResultHandler {
String url = customProductSearch.replace("%s", text);
if (rawResult != null) {
url = url.replace("%f", rawResult.getBarcodeFormat().toString());
if (url.contains("%t")) {
ParsedResult parsedResultAgain = ResultParser.parseResult(rawResult);
url = url.replace("%t", parsedResultAgain.getType().toString());
}
}
return url;
}