Compare commits

...
10 Commits
Author SHA1 Message Date
Max Lv a33fcc6930 Bump version 2016-11-24 16:56:56 +08:00
Max Lv d82539b198 Drop the table if the database upgrading failed. #987 2016-11-23 12:22:43 +08:00
Max Lv 7922159e5e Bump version 2016-11-23 09:13:54 +08:00
yyxida fabab2854f completed Japanese translation (The vast majority) (#986)
completed Japanese translation (The vast majority)

日本語の翻訳は完成した(大多数)
2016-11-20 00:06:34 -06:00
Eva Kane 6a9464e08d Fix Japanese translation again (#983) 2016-11-19 20:11:05 +08:00
Mygod f70e905bce Fix Japanese translation 2016-11-19 17:31:12 +08:00
Max Lv 90b5780d91 Fix #982 2016-11-19 09:22:08 +08:00
Max Lv d189044808 Bump version 2016-11-19 09:22:08 +08:00
yyxida 5a03f52545 Update strings.xml (#981)
Change some words
2016-11-18 07:08:49 -06:00
yyxida 2d4d6737ff Add Japanese translation (#978) 2016-11-18 01:20:47 -06:00
7 changed files with 221 additions and 70 deletions
+3 -3
View File
@@ -5,8 +5,8 @@ enablePlugins(AndroidApp)
android.useSupportVectors
name := "shadowsocks"
version := "3.2.7"
versionCode := Some(167)
version := "3.3.0"
versionCode := Some(170)
platformTarget := "android-25"
@@ -27,7 +27,7 @@ proguardOptions ++=
shrinkResources := true
typedResources := false
resConfigs := Seq("ru", "zh-rCN", "zh-rTW")
resConfigs := Seq("ja", "ru", "zh-rCN", "zh-rTW")
resolvers += Resolver.jcenterRepo
libraryDependencies ++=
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="proxied_apps_summary">選択したアプリにプロキシを設定する</string>
</resources>
+142
View File
@@ -0,0 +1,142 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">シャドーソックス</string>
<string name="quick_toggle">スイッチ</string>
<string name="misc_cat">その他</string>
<string name="proxy_cat">サーバーの設定</string>
<string name="profile_name">設定名</string>
<string name="profile">配置ファイル</string>
<string name="profile_summary">配置ファイルを新規作成か他のを切り替える</string>
<string name="proxy">サーバー</string>
<string name="remote_port">リモートポート</string>
<string name="port">ローカルポート</string>
<string name="sitekey">パスワード</string>
<string name="enc_method">暗号方式</string>
<string name="feature_cat">機能設定</string>
<string name="http_proxy">HTTP 代理サーバー</string>
<string name="http_proxy_summary">ローカル HTTP 代理</string>
<string name="dns_proxy">DNS 代理</string>
<string name="dns_proxy_summary">重定向 DNS 查询到远程服务器</string>
<string name="auto_set_gfwlist">中国ルーティング</string>
<string name="auto_set_gfwlist_summary">中国本土アドレスをバイパス</string>
<string name="route_list">ルーティング</string>
<string name="proxied_apps">選択したアプリにプロキシ</string>
<string name="proxied_apps_summary">为应用程序分别设置代理,在 4.x 下需要启用 NAT 模式</string>
<string name="on">オン</string>
<string name="bypass_apps">バイパスモード</string>
<string name="bypass_apps_summary">启用该选项,以使所选应用程序的流量不经过代理</string>
<string name="auto_connect">自動接続</string>
<string name="auto_connect_summary">随系统启动后台服务</string>
<string name="tcp_fastopen_summary">切り替えるはROOT権限が必要です</string>
<string name="tcp_fastopen_summary_unsupported">不支持的内核版本:%s &lt; 3.7.1</string>
<string name="forward_success">后台服务已开始运行。</string>
<string name="service_failed">リモートサーバーを接続できません</string>
<string name="invalid_server">サーバー名が無効です</string>
<string name="method_unsafe">警告する:この暗号化アルゴリズムは不安です</string>
<string name="nat_deprecated">警告:在 Android 5.0 及更高版本中不建议使用 NAT 模式</string>
<string name="nat_no_root">NAT モードは ROOT権限が必要です</string>
<string name="switch_to_vpn">VPN モードに切り替える</string>
<string name="stop">止める</string>
<string name="quick_switch">切り替える</string>
<string name="stopping">閉じます……</string>
<string name="vpn_error">后台服务启动失败:%s</string>
<string name="reboot_required">VPN 服务启动失败。你可能需要重启设备。</string>
<string name="close">閉じる</string>
<string name="proxy_empty">代理サーバのアドレスやパスワードは空白がいけません</string>
<string name="connect">接続</string>
<string name="initializing">初期化します……</string>
<string name="recovering">リセットします……</string>
<string name="loading">読み込み中……</string>
<string name="profiles">配置ファイル</string>
<string name="settings">オプションの設定</string>
<string name="remove_profile">このサーバーの設定を削除する「%s」?</string>
<string name="recovery">リセット</string>
<string name="recovery_summary">すべてのバックグラウンドサービスをリセットする</string>
<string name="about">関する</string>
<string name="about_title">シャドーソックス(shadowsocks)%s</string>
<string name="flush_dnscache">DNS キャッシングをリフレッシュする</string>
<string name="flush_dnscache_summary">只需在 NAT 模式下使用,需要 ROOT 权限</string>
<string name="flush_dnscache_no_root">在没有 ROOT 权限的情况下无法刷新 DNS 缓存</string>
<string name="flushing">リフレッシュします……</string>
<string name="share">シェア</string>
<string name="share_message">QRコードを読み取るやAndroid Beam (NFC) 使用する</string>
<string name="share_message_without_nfc">QRコードを読み取る</string>
<string name="share_message_nfc_disabled">QRコードを読み取る\nAndroid Beam が無効にする</string>
<string name="turn_on_nfc">NFC を付ける &amp; Android Beam</string>
<string name="add_profile">配置ファイルを加える</string>
<string name="nat">NAT モード (デバッギングだけ)</string>
<string name="nat_summary">从 VPN 模式切换为 NAT 模式,需要 ROOT 权限</string>
<string name="udp_dns">UDP 転送</string>
<string name="udp_dns_summary">リモートサーバーでUDPプロトコルのパケット</string>
<string name="onetime_auth">ワンタイム認証</string>
<string name="onetime_auth_summary">ワンタイム認証を付ける</string>
<string name="ipv6">IPv6 ルーティング</string>
<string name="ipv6_summary">リモートサーバーに IPv6 トラフィックを転送</string>
<string name="stat">ネットワークトラフィック</string>
<string name="stat_summary">送信済み: \t%3$s\t↑\t%1$s/s\n受け取る: \t%4$s\t↓\t%2$s/s</string>
<string name="connection_test_pending">接続を確認する</string>
<string name="connection_test_testing">テスト中...</string>
<string name="connection_test_available">成功: %d ミリ秒の遅延</string>
<string name="connection_test_fail">インターネット利用不可</string>
<string name="connection_test_error">失敗します:%s</string>
<string name="connection_test_error_status_code">状態コード無効(#%d)</string>
<!-- profile -->
<string name="profile_manager_dialog">配置ファイル</string>
<string name="profile_manager_dialog_content">&#8226; クリックで配置ファイルに選択する;\n&#8226; 左/右へ滑るか左にクリックするで削除する;\n&#8226;
長押しやドラッグで順序を変える。</string>
<string name="gotcha">分かる</string>
<string name="copy_url">コピー URL</string>
<string name="add_profile_dialog">シャドーソックスに配置ファイルを加えますか</string>
<string name="add_profile_methods_scan_qr_code">QRコードを読み取る</string>
<string name="add_profile_methods_manual_settings">手動でセットアップ</string>
<string name="add_profile_nfc_hint_title">Android Beam (NFC) で配置ファイルを加える</string>
<string name="add_profile_nfc_hint">2台の設備を保持すると同時に、また別の設備に、配置ファイルの共有ボタンをクリックし、彼らをいっしょに置きます。\nNFC ラベルスがキャニングもできる。</string>
<string name="add_profile_scanner_permission_required">QRコードを読み取るはカメラ権限が必要である。</string>
<string-array name="route_entry">
<item>すべで</item>
<item>LANアドレスをバイパス</item>
<item>中国本土アドレスをバイパス</item>
<item>LANアドレスや中国本土アドレスをバイパス</item>
<item>中国本土で接続できないのアドレスだけを代理する</item>
<item>中国本土のアドレスだけを代理する</item>
</string-array>
<string name="action_apply_all">すべでの配置ファイルに使用する</string>
<string name="action_export">クリップボードに輸出</string>
<string name="action_import">クリップボードからインポート</string>
<string name="action_export_msg">クリップボードに輸出成功</string>
<string name="action_export_err">クリップボードに輸出失敗</string>
<string name="action_import_msg">インポート成功</string>
<string name="action_import_err">インポート失敗</string>
<plurals name="removed">
<item quantity="one">削除しました</item>
<item quantity="other">%d アイテムを削除しました</item>
</plurals>
<string name="undo">取り消し</string>
<string name="toggle_service_state">サービスを開始する</string>
<string name="start_service_default">当面のサーバー接続する</string>
<string name="start_service">%s に接続する</string>
<string name="stop_service">%s に切り替える</string>
<string name="profile_default">当面の配置を使用する</string>
<!-- status -->
<string name="sent">送信済み:</string>
<string name="received">受け取る:</string>
<!-- kcp -->
<string name="kcp_summary">KCP ロトコル を有効にする</string>
<string name="kcp_port">KCP ポート</string>
<string name="kcp_port_summary">%d(リモート KCPTUN サーバーのポート番号)</string>
<string name="kcpcli">KCP パラメータ</string>
</resources>
@@ -295,7 +295,7 @@ final class ProfileManagerActivity extends AppCompatActivity with OnMenuItemClic
case R.id.fab_qrcode_add =>
menu.toggle(false)
val intent = new Intent(this, classOf[ScannerActivity])
startActivityForResult(intent, REQUEST_QRCODE)
startActivity(intent)
case R.id.fab_nfc_add =>
menu.toggle(true)
val dialog = new AlertDialog.Builder(ProfileManagerActivity.this)
@@ -385,14 +385,6 @@ final class ProfileManagerActivity extends AppCompatActivity with OnMenuItemClic
super.onDestroy
}
override def onActivityResult(requestCode: Int, resultCode: Int, data: Intent) {
if (requestCode == REQUEST_QRCODE && resultCode == Activity.RESULT_OK) {
val contents = data.getStringExtra("uri")
if (!TextUtils.isEmpty(contents))
Parser.findAll(contents).foreach(app.profileManager.createProfile)
}
}
override def onBackPressed() {
if (menu.isOpened) menu.close(true) else super.onBackPressed()
}
@@ -8,8 +8,11 @@ import android.support.v4.app.ActivityCompat
import android.support.v4.content.ContextCompat
import android.support.v7.app.AppCompatActivity
import android.support.v7.widget.Toolbar
import android.text.TextUtils
import android.widget.Toast
import com.google.zxing.Result
import com.github.shadowsocks.ShadowsocksApplication.app
import com.github.shadowsocks.utils.Parser
import me.dm7.barcodescanner.zxing.ZXingScannerView
object ScannerActivity {
@@ -73,9 +76,9 @@ class ScannerActivity extends AppCompatActivity with ZXingScannerView.ResultHand
}
override def handleResult(rawResult: Result) = {
val intent = new Intent()
intent.putExtra("uri", rawResult.getText)
setResult(Activity.RESULT_OK, intent)
val uri = rawResult.getText
if (!TextUtils.isEmpty(uri))
Parser.findAll(uri).foreach(app.profileManager.createProfile)
navigateUp()
}
}
@@ -46,6 +46,7 @@ import com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper
import com.j256.ormlite.dao.Dao
import com.j256.ormlite.support.ConnectionSource
import com.j256.ormlite.table.TableUtils
import com.github.shadowsocks.ShadowsocksApplication.app
import scala.collection.JavaConverters._
import scala.collection.mutable
@@ -81,65 +82,74 @@ class DBHelper(val context: Context)
onCreate(database, connectionSource)
return
}
if (oldVersion < 8) {
profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN udpdns SMALLINT;")
}
if (oldVersion < 9) {
profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN route VARCHAR DEFAULT 'all';")
} else if (oldVersion < 19) {
profileDao.executeRawNoArgs("UPDATE `profile` SET route = 'all' WHERE route IS NULL;")
}
if (oldVersion < 10) {
profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN auth SMALLINT;")
}
if (oldVersion < 11) {
profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN ipv6 SMALLINT;")
}
if (oldVersion < 12) {
profileDao.executeRawNoArgs("BEGIN TRANSACTION;")
profileDao.executeRawNoArgs("ALTER TABLE `profile` RENAME TO `tmp`;")
TableUtils.createTable(connectionSource, classOf[Profile])
profileDao.executeRawNoArgs(
"INSERT INTO `profile`(id, name, host, localPort, remotePort, password, method, route, proxyApps, bypass," +
" udpdns, auth, ipv6, individual) " +
"SELECT id, name, host, localPort, remotePort, password, method, route, 1 - global, bypass, udpdns, auth," +
" ipv6, individual FROM `tmp`;")
profileDao.executeRawNoArgs("DROP TABLE `tmp`;")
profileDao.executeRawNoArgs("COMMIT;")
} else if (oldVersion < 13) {
profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN tx LONG;")
profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN rx LONG;")
profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN date VARCHAR;")
}
if (oldVersion < 15) {
if (oldVersion >= 12) profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN userOrder LONG;")
var i = 0
for (profile <- profileDao.queryForAll.asScala) {
if (oldVersion < 14) profile.individual = updateProxiedApps(context, profile.individual)
profile.userOrder = i
profileDao.update(profile)
i += 1
try {
if (oldVersion < 8) {
profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN udpdns SMALLINT;")
}
if (oldVersion < 9) {
profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN route VARCHAR DEFAULT 'all';")
} else if (oldVersion < 19) {
profileDao.executeRawNoArgs("UPDATE `profile` SET route = 'all' WHERE route IS NULL;")
}
if (oldVersion < 10) {
profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN auth SMALLINT;")
}
if (oldVersion < 11) {
profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN ipv6 SMALLINT;")
}
if (oldVersion < 12) {
profileDao.executeRawNoArgs("BEGIN TRANSACTION;")
profileDao.executeRawNoArgs("ALTER TABLE `profile` RENAME TO `tmp`;")
TableUtils.createTable(connectionSource, classOf[Profile])
profileDao.executeRawNoArgs(
"INSERT INTO `profile`(id, name, host, localPort, remotePort, password, method, route, proxyApps, bypass," +
" udpdns, auth, ipv6, individual) " +
"SELECT id, name, host, localPort, remotePort, password, method, route, 1 - global, bypass, udpdns, auth," +
" ipv6, individual FROM `tmp`;")
profileDao.executeRawNoArgs("DROP TABLE `tmp`;")
profileDao.executeRawNoArgs("COMMIT;")
} else if (oldVersion < 13) {
profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN tx LONG;")
profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN rx LONG;")
profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN date VARCHAR;")
}
}
if (oldVersion < 16) {
profileDao.executeRawNoArgs("UPDATE `profile` SET route = 'bypass-lan-china' WHERE route = 'bypass-china'")
}
if (oldVersion < 15) {
if (oldVersion >= 12) profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN userOrder LONG;")
var i = 0
for (profile <- profileDao.queryForAll.asScala) {
if (oldVersion < 14) profile.individual = updateProxiedApps(context, profile.individual)
profile.userOrder = i
profileDao.update(profile)
i += 1
}
}
if (oldVersion < 17) {
profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN kcp SMALLINT;")
profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN kcpcli VARCHAR DEFAULT " +
"'--crypt none --mode normal --mtu 1200 --nocomp --dscp 46 --parityshard 0';")
} else if (oldVersion < 20) {
profileDao.executeRawNoArgs("UPDATE `profile` SET kcpcli = '--crypt none --mode normal --mtu 1200 --nocomp " +
"--dscp 46 --parityshard 0' WHERE kcpcli IS NULL;")
}
if (oldVersion < 16) {
profileDao.executeRawNoArgs("UPDATE `profile` SET route = 'bypass-lan-china' WHERE route = 'bypass-china'")
}
if (oldVersion < 18) {
profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN kcpPort INTEGER DEFAULT 8399;")
} else if (oldVersion < 19) {
profileDao.executeRawNoArgs("UPDATE `profile` SET kcpPort = 8399 WHERE kcpPort = 0;")
if (oldVersion < 17) {
profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN kcp SMALLINT;")
profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN kcpcli VARCHAR DEFAULT " +
"'--crypt none --mode normal --mtu 1200 --nocomp --dscp 46 --parityshard 0';")
} else if (oldVersion < 20) {
profileDao.executeRawNoArgs("UPDATE `profile` SET kcpcli = '--crypt none --mode normal --mtu 1200 --nocomp " +
"--dscp 46 --parityshard 0' WHERE kcpcli IS NULL;")
}
if (oldVersion < 18) {
profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN kcpPort INTEGER DEFAULT 8399;")
} else if (oldVersion < 19) {
profileDao.executeRawNoArgs("UPDATE `profile` SET kcpPort = 8399 WHERE kcpPort = 0;")
}
} catch {
case ex: Exception =>
app.track(ex)
profileDao.executeRawNoArgs("DROP TABLE IF EXISTS 'profile';")
onCreate(database, connectionSource)
return
}
}
}