This commit is contained in:
Miguel E. Hernández Cuervo 2015-02-12 09:08:25 -05:00
commit 82861cd85d
9 changed files with 80 additions and 84 deletions

View file

@ -38,6 +38,7 @@ Eric Kobrin (Velocitude)
evansepdx
Erik Barbara
Facundo Farias
fakhri626
fics.danmark
Francois B. (Google)
Frank Yellin

View file

@ -112,7 +112,7 @@
<string name="preferences_front_light_summary">Améliore le balayage lors d\'une faible luminosité sur certains téléphone, mais peut causer un reflet. Ne fonctionne pas sur tous les téléphones.</string>
<string name="preferences_front_light_title">Utiliser la lumière frontale</string>
<string name="preferences_general_title">Paramètres généraux</string>
<string name="preferences_history_summary">Stockez vos scans dans l'histoire</string>
<string name="preferences_history_summary">Stockez vos scans dans l\'histoire</string>
<string name="preferences_history_title">Ajouter à Histoire</string>
<string name="preferences_invert_scan_summary">Balayer des codes-barres blancs sur fond noir. Non disponible sur certains appareils.</string>
<string name="preferences_invert_scan_title">Balayage négatif</string>

View file

@ -23,8 +23,8 @@
<string name="button_book_search">Cari Buku</string>
<string name="button_cancel">Batal</string>
<string name="button_custom_product_search">Pencarian kustom</string>
<string name="button_dial">Panggil nomor</string>
<string name="button_email">Kirim surel</string>
<string name="button_dial">Menghubungi nomor</string>
<string name="button_email">Kirim email</string>
<string name="button_get_directions">Dapatkan petunjuk arah</string>
<string name="button_mms">Kirim MMS</string>
<string name="button_ok">OK</string>
@ -33,7 +33,7 @@
<string name="button_search_book_contents">Cari isi</string>
<string name="button_share_app">Aplikasi</string>
<string name="button_share_bookmark">Bookmark</string>
<string name="button_share_by_email">Bagikan melalui surel</string>
<string name="button_share_by_email">Bagikan melalui email</string>
<string name="button_share_by_sms">Bagikan melalui SMS</string>
<string name="button_share_clipboard">Clipboard</string>
<string name="button_share_contact">Kontak</string>
@ -42,7 +42,7 @@
<string name="button_web_search">Pencarian web</string>
<string name="button_wifi">Hubungkan ke Jaringan</string>
<string name="contents_contact">Informasi kontak</string>
<string name="contents_email">Alamat surel</string>
<string name="contents_email">Alamat email</string>
<string name="contents_location">Koordinat geografis</string>
<string name="contents_phone">Nomor telepon</string>
<string name="contents_sms">Alamat SMS</string>
@ -51,7 +51,7 @@
<string name="history_clear_text">Hapus riwayat</string>
<string name="history_email_title">Riwayat Barcode Scanner</string>
<string name="history_empty">Kosong</string>
<string name="history_empty_detail">Tidak ada scan barcode telah dicatat belum</string>
<string name="history_empty_detail">Tidak ada pemindaian barcode yang pernah dicatat</string>
<string name="history_send">Kirim riwayat</string>
<string name="history_title">Riwayat</string>
<string name="menu_encode_mecard">Gunakan MECARD</string>
@ -61,8 +61,8 @@
<string name="menu_settings">Pengaturan</string>
<string name="menu_share">Bagikan</string>
<string name="msg_bulk_mode_scanned">Bulk mode: barcode sudah dipindai dan disimpan</string>
<string name="msg_camera_framework_bug">Maaf, kamera pada Android mengalami masalah. Anda mungkin perlu me-restart perangkat.</string>
<string name="msg_default_format">Bentuk</string>
<string name="msg_camera_framework_bug">Maaf, kamera mengalami masalah. Anda mungkin perlu me-restart perangkat.</string>
<string name="msg_default_format">Format</string>
<string name="msg_default_meta">Metadata</string>
<string name="msg_default_mms_subject">Hai</string>
<string name="msg_default_status">Letakkan barcode di dalam kotak jendela untuk memindai.</string>
@ -100,42 +100,42 @@
<string name="preferences_decode_Data_Matrix_title">Data Matriks</string>
<string name="preferences_decode_PDF417_title">PDF417 (β)</string>
<string name="preferences_decode_QR_title">QR Codes</string>
<string name="preferences_device_bug_workarounds_title">Perangkat Bug Workarounds</string>
<string name="preferences_disable_barcode_scene_mode_title">Tidak ada modus barcode scene</string>
<string name="preferences_disable_continuous_focus_summary">Gunakan hanya modus fokus standar</string>
<string name="preferences_disable_continuous_focus_title">Tidak ada fokus terus menerus</string>
<string name="preferences_disable_exposure_title">Eksposur ada</string>
<string name="preferences_disable_metering_title">Metering ada</string>
<string name="preferences_device_bug_workarounds_title">Device Bug Workarounds</string>
<string name="preferences_disable_barcode_scene_mode_title">Tidak ada modus tempat kejadian barcode</string>
<string name="preferences_disable_continuous_focus_summary">Hanya gunakan mode fokus standar</string>
<string name="preferences_disable_continuous_focus_title">Jangan gunakan fokus terus menerus</string>
<string name="preferences_disable_exposure_title">Tanpa eksposur</string>
<string name="preferences_disable_metering_title">Tanpa pengukuran</string>
<string name="preferences_front_light_auto">Otomatis</string>
<string name="preferences_front_light_off">Non-aktif</string>
<string name="preferences_front_light_on">Aktif</string>
<string name="preferences_front_light_summary">Meningkatkan scanning dalam cahaya rendah pada beberapa ponsel, namun dapat menyebabkan silau. Tidak bekerja pada semua ponsel.</string>
<string name="preferences_front_light_summary">Meningkatkan pemindaian dalam cahaya rendah pada beberapa ponsel, namun dapat menyebabkan silau. Tidak dapat bekerja pada semua ponsel.</string>
<string name="preferences_front_light_title">Gunakan lampu depan</string>
<string name="preferences_general_title">Pengaturan umum</string>
<string name="preferences_history_summary">Simpan scan Anda dalam Sejarah</string>
<string name="preferences_history_title">Tambahkan ke Sejarah</string>
<string name="preferences_history_summary">Simpan hasil pemindaian Anda dalam riwayat</string>
<string name="preferences_history_title">Tambahkan ke riwayat</string>
<string name="preferences_invert_scan_summary">Memindai barcode putih pada latar belakang hitam. Tidak tersedia pada beberapa perangkat.</string>
<string name="preferences_invert_scan_title">Balikkan memindai</string>
<string name="preferences_invert_scan_title">Membalikkan pemindaian</string>
<string name="preferences_name">Pengaturan</string>
<string name="preferences_orientation_title">Tidak ada rotasi otomatis</string>
<string name="preferences_play_beep_title">Beep</string>
<string name="preferences_orientation_title">Jangan rotasi otomatis</string>
<string name="preferences_play_beep_title">Bunyi</string>
<string name="preferences_remember_duplicates_summary">Simpan beberapa pindaian dari barcode yang sama di dalam Riwayat</string>
<string name="preferences_remember_duplicates_title">Ingat duplikasi</string>
<string name="preferences_result_title">Hasil pengaturan</string>
<string name="preferences_scanning_title">Ketika memindai barcode, decode\u2026</string>
<string name="preferences_search_country">Pencarian negara</string>
<string name="preferences_search_country">Pilih negara</string>
<string name="preferences_supplemental_summary">Mencoba mendapatkan beberapa informasi mengenai isi barcode</string>
<string name="preferences_supplemental_title">Ambil informasi lebih lanjut</string>
<string name="preferences_vibrate_title">Bergetar</string>
<string name="result_address_book">Informasi kontak ditemukan</string>
<string name="result_calendar">Kalendar acara ditemukan</string>
<string name="result_email_address">Alamat surel ditemukan</string>
<string name="result_email_address">Alamat email ditemukan</string>
<string name="result_geo">Koordinat geografis ditemukan</string>
<string name="result_isbn">Buku ditemukan</string>
<string name="result_product">Produk ditemukan</string>
<string name="result_sms">Alamat SMS ditemukan</string>
<string name="result_tel">Nomor telepon ditemukan</string>
<string name="result_text">Teks biasa ditemukan</string>
<string name="result_text">Teks ditemukan</string>
<string name="result_uri">URL ditemukan</string>
<string name="result_wifi">Konfigurasi WLAN ditemukan</string>
<string name="sbc_name">Pencarian Google Book</string>

View file

@ -198,6 +198,8 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
&& (intent == null || intent.getBooleanExtra(Intents.Scan.SAVE_HISTORY, true));
source = IntentSource.NONE;
sourceUrl = null;
scanFromWebPageManager = null;
decodeFormats = null;
characterSet = null;
@ -681,6 +683,7 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
if (scanFromWebPageManager != null && scanFromWebPageManager.isScanFromWebPage()) {
String replyURL = scanFromWebPageManager.buildReplyURL(rawResult, resultHandler);
scanFromWebPageManager = null;
sendReplyMessage(R.id.launch_product_query, replyURL, resultDurationMS);
}

View file

@ -26,7 +26,7 @@ public final class OpenCameraInterface {
private OpenCameraInterface() {
}
/** For {@link #open(int), means no preference for which camera to open. */
/** For {@link #open(int)}, means no preference for which camera to open. */
public static final int NO_REQUESTED_CAMERA = -1;
/**

View file

@ -72,16 +72,12 @@ final class X12Encoder extends C40Encoder {
context.updateSymbolInfo();
int available = context.getSymbolInfo().getDataCapacity() - context.getCodewordCount();
int count = buffer.length();
if (count == 2) {
context.pos -= count;
if (context.getRemainingCharacters() > 1 || available > 1 ||
context.getRemainingCharacters() != available) {
context.writeCodeword(HighLevelEncoder.X12_UNLATCH);
context.pos -= 2;
context.signalEncoderChange(HighLevelEncoder.ASCII_ENCODATION);
} else if (count == 1) {
context.pos--;
if (available > 1) {
context.writeCodeword(HighLevelEncoder.X12_UNLATCH);
}
//NOP - No unlatch necessary
}
if (context.getNewEncoding() < 0) {
context.signalEncoderChange(HighLevelEncoder.ASCII_ENCODATION);
}
}

View file

@ -16,8 +16,11 @@
package com.google.zxing.datamatrix.encoder;
import java.nio.charset.StandardCharsets;
import junit.framework.ComparisonFailure;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
@ -316,6 +319,18 @@ public final class HighLevelEncodeTestCase extends Assert {
assertEquals("240 13 33 88 181 64 78 124 59 105 105 105", visualized);
}
@Test
public void testX12Unlatch() {
String visualized = encodeHighLevel("*DTCP01");
assertEquals("238 9 10 104 141 254 50 129", visualized);
}
@Test
public void testX12Unlatch2() {
String visualized = encodeHighLevel("*DTCP0");
assertEquals("238 9 10 104 141", visualized);
}
@Test
public void testBug3048549() {
//There was an IllegalArgumentException for an illegal character here because
@ -334,14 +349,13 @@ public final class HighLevelEncodeTestCase extends Assert {
assertEquals("236 185 185 29 196 196 129 56", visualized);
}
// Not passing?
/*
@Ignore
@Test
public void testDataURL() {
byte[] data = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A,
0x7E, 0x7F, (byte) 0x80, (byte) 0x81, (byte) 0x82};
String expected = encodeHighLevel(new String(data, StandardCharsets.ISO-8859-1)));
String expected = encodeHighLevel(new String(data, StandardCharsets.ISO_8859_1));
String visualized = encodeHighLevel("url(data:text/plain;charset=iso-8859-1,"
+ "%00%01%02%03%04%05%06%07%08%09%0A%7E%7F%80%81%82)");
assertEquals(expected, visualized);
@ -350,7 +364,6 @@ public final class HighLevelEncodeTestCase extends Assert {
visualized = encodeHighLevel("url(data:;base64,flRlc3R+)");
assertEquals("127 85 102 116 117 127 129 56", visualized);
}
*/
private static String encodeHighLevel(String msg) {
CharSequence encoded = HighLevelEncoder.encodeHighLevel(msg);

View file

@ -118,7 +118,9 @@ public final class StringsResourceTranslator {
String parentName = translatedFile.getParent().getFileName().toString();
Matcher stringsFileNameMatcher = STRINGS_FILE_NAME_PATTERN.matcher(parentName);
stringsFileNameMatcher.find();
if (!stringsFileNameMatcher.find()) {
throw new IllegalArgumentException("Invalid parent dir: " + parentName);
}
String language = stringsFileNameMatcher.group(1);
String massagedLanguage = LANGUAGE_CODE_MASSAGINGS.get(language);
if (massagedLanguage != null) {
@ -151,6 +153,8 @@ public final class StringsResourceTranslator {
if (translatedString == null || forceRetranslation.contains(key)) {
anyChange = true;
translatedString = translateString(value, language);
// Specially for string resources, escape ' with \
translatedString = translatedString.replaceAll("'", "\\\\'");
}
out.write(translatedString);
@ -193,10 +197,8 @@ public final class StringsResourceTranslator {
String translation = m.group(1);
// This is a little crude; unescape some common escapes in the raw response
translation = translation.replaceAll("&quot;", "\"");
translation = translation.replaceAll("&#39;", "'");
translation = translation.replaceAll("&amp;quot;", "\"");
translation = translation.replaceAll("&amp;#39;", "'");
translation = translation.replaceAll("&(amp;)?quot;", "\"");
translation = translation.replaceAll("&(amp;)?#39;", "'");
System.out.println(" Got translation " + translation);
return translation;

65
pom.xml
View file

@ -99,25 +99,6 @@
<zxing.version>3.1.1-SNAPSHOT</zxing.version>
</properties>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
@ -253,6 +234,28 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jarsigner-plugin</artifactId>
<version>1.3.2</version>
<executions>
<execution>
<id>signing</id>
<goals>
<goal>sign</goal>
</goals>
<phase>package</phase>
<configuration>
<includes>
<include>target/*.apk</include>
</includes>
<keystore>../private/ZXing.keystore</keystore>
<alias>zxing</alias>
<arguments>
<argument>-sigalg</argument>
<argument>MD5withRSA</argument>
<argument>-digestalg</argument>
<argument>SHA1</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@ -364,7 +367,7 @@
<dependency>
<groupId>net.sf.proguard</groupId>
<artifactId>proguard-base</artifactId>
<version>5.0</version>
<version>5.2</version>
</dependency>
</dependencies>
</plugin>
@ -620,28 +623,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jarsigner-plugin</artifactId>
<executions>
<execution>
<id>signing</id>
<goals>
<goal>sign</goal>
</goals>
<phase>package</phase>
<configuration>
<includes>
<include>target/*.apk</include>
</includes>
<keystore>../private/ZXing.keystore</keystore>
<alias>zxing</alias>
<arguments>
<argument>-sigalg</argument>
<argument>MD5withRSA</argument>
<argument>-digestalg</argument>
<argument>SHA1</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>