Add more translation

This commit is contained in:
kuoruan 2017-01-04 13:53:02 +08:00
parent ad551f2969
commit c087af8e78
16 changed files with 70 additions and 65 deletions

View File

@ -536,7 +536,7 @@
<ul class="stats pull-left" ng-switch-when="active">
<!-- {{{ active download statistics -->
<li class="label label-active hidden-phone hidden-tablet">
<span title="{{ 'Download status' | translate }}"><span class="fa fa-fw fa-play">&nbsp;</span> {{download.status}}</span>
<span title="{{ 'Download status' | translate }}"><span class="fa fa-fw fa-play">&nbsp;</span> {{ 'Active' | translate }}</span>
</li>
<li class="label label-default" ng-class="{'label-active': download.downloadSpeed > 2048, 'label-warning': download.downloadSpeed <= 2048}">
@ -569,7 +569,7 @@
<ul class="stats pull-left" ng-switch-when="verifing">
<!-- {{{ active download statistics -->
<li class="label label-warning hidden-phone hidden-tablet">
<span title="{{ 'Download status' | translate }}"><span class="fa fa-fw fa-play">&nbsp;</span> {{download.status}}</span>
<span title="{{ 'Download status' | translate }}"><span class="fa fa-fw fa-play">&nbsp;</span> {{ 'Verifing' | translate }}</span>
</li>
<li class="label label-default" ng-class="{'label-active': download.downloadSpeed > 2048, 'label-warning': download.downloadSpeed <= 2048}">
@ -602,7 +602,7 @@
<ul class="stats pull-left" ng-switch-when="verifyPending">
<!-- {{{ active download statistics -->
<li class="label label-warning hidden-phone hidden-tablet">
<span title="{{ 'Download status' | translate }}"><span class="fa fa-fw fa-play">&nbsp;</span> {{download.status}}</span>
<span title="{{ 'Download status' | translate }}"><span class="fa fa-fw fa-play">&nbsp;</span> {{ 'Verify Pending' | translate}}</span>
</li>
<li class="label label-default" ng-class="{'label-active': download.downloadSpeed > 2048, 'label-warning': download.downloadSpeed <= 2048}">
@ -635,7 +635,7 @@
<ul class="stats pull-left" ng-switch-when="paused">
<!-- {{{ paused download statistics -->
<li class="label label-info">
<span title="{{ 'Download status' | translate }}"><span class="fa fa-fw fa-pause">&nbsp;</span> {{download.status}}</span>
<span title="{{ 'Download status' | translate }}"><span class="fa fa-fw fa-pause">&nbsp;</span> {{ 'Paused' | translate }}</span>
</li>
<li class="label label-info">
@ -656,7 +656,7 @@
<ul class="stats pull-left" ng-switch-when="waiting">
<!-- {{{ paused download statistics -->
<li class="label label-default">
<span title="{{ 'Download status' | translate }}"><span class="fa fa-fw fa-caret-right">&nbsp;</span> {{download.status}}</span>
<span title="{{ 'Download status' | translate }}"><span class="fa fa-fw fa-caret-right">&nbsp;</span> {{ 'Waiting' | translate }}</span>
</li>
<li class="label label-default">
@ -678,7 +678,7 @@
<!-- {{{ complete download statistics -->
<li class="label label-success">
<span title="{{ 'Download status' | translate }}"><span class="fa fa-fw fa-check-square-o">&nbsp;</span> {{download.status}}</span>
<span title="{{ 'Download status' | translate }}"><span class="fa fa-fw fa-check-square-o">&nbsp;</span> {{ 'Complete' | translate }}</span>
</li>
<li class="label label-success">
@ -695,7 +695,7 @@
<ul class="stats pull-left" ng-switch-when="removed">
<!-- {{{ removed download statistics -->
<li class="label label-warning">
<span title="{{ 'Download status' | translate }}"><span class="fa fa-fw fa-times">&nbsp;</span> {{download.status}}</span>
<span title="{{ 'Download status' | translate }}"><span class="fa fa-fw fa-times">&nbsp;</span> {{ 'Removed' | translate }}</span>
</li>
<li class="label label-warning">

View File

@ -9,11 +9,11 @@ angular
'$scope', '$name', '$enable', '$rpc', '$rpchelpers', '$utils', '$alerts', '$modals',
'$fileSettings', '$activeInclude', '$waitingExclude', '$pageSize', '$getErrorStatus',
// for document title
'$rootScope',
'$rootScope', '$filter',
function(
scope, name, enable, rpc, rhelpers, utils, alerts, modals,
fsettings, activeInclude, waitingExclude, pageSize, getErrorStatus,
rootScope
rootScope, filter
) {
scope.name = name; // default UI name
@ -82,7 +82,9 @@ function(
// HACK to make sure an angular digest is not running, as only one can happen at a time, and confirm is a blocking
// call so an rpc response can also trigger a digest call
setTimeout(function() {
if (!noConfirm && !confirm("Remove %s and associated meta-data?".replace("%s", d.name))) {
if (!noConfirm && !confirm(
filter('translate')('Remove {{name}} and associated meta-data?',
{ name: d.name }))) {
return;
}

View File

@ -8,12 +8,12 @@ angular
'$scope', '$modals',
'$rpc', '$rpchelpers', '$fileSettings',
'$globalSettings', '$globalExclude',
'$utils', '$translate',
'$utils', '$translate', '$filter',
function(
scope, modals,
rpc, rhelpers, fsettings,
gsettings, gexclude,
utils, translate
utils, translate, filter
) {
scope.isFeatureEnabled = function(f) { return rhelpers.isFeatureEnabled(f) };
@ -98,26 +98,28 @@ angular
modals.invoke(
'settings', _.cloneDeep(settings),
'Global Settings', 'Save', function(chsettings) {
filter('translate')('Global Settings'),
filter('translate')('Save'),
function(chsettings) {
var sets = {};
var starred = [];
for (var i in chsettings) {
// no need to change default values
if (settings[i].val != chsettings[i].val)
sets[i] = chsettings[i].val
var sets = {};
var starred = [];
for (var i in chsettings) {
// no need to change default values
if (settings[i].val != chsettings[i].val)
sets[i] = chsettings[i].val
if (chsettings[i].starred) {
starred.push(i);
}
};
if (chsettings[i].starred) {
starred.push(i);
}
};
console.log('saving aria2 settings:', sets);
console.log('saving aria2 starred:', starred);
console.log('saving aria2 settings:', sets);
console.log('saving aria2 starred:', starred);
rpc.once('changeGlobalOption', [sets]);
utils.setCookie('aria2props', starred);
});
rpc.once('changeGlobalOption', [sets]);
utils.setCookie('aria2props', starred);
});
});
};

View File

@ -108,7 +108,7 @@ function(syscall, globalTimeout, alerts, utils, rootScope, uri, authconf, filter
else {
alerts.addAlert('<strong>' + filter('translate')('Oh Snap!') + '</strong> ' +
filter('translate')('Could not connect to the aria2 RPC server. Will retry in 10 secs. You might want to check the connection settings by going to Settings > Connection Settings')
, 'error')
, 'error');
timeout = setTimeout(update, globalTimeout);
}
};
@ -123,7 +123,8 @@ function(syscall, globalTimeout, alerts, utils, rootScope, uri, authconf, filter
if (failed) {
needNewConnection = true;
alerts.addAlert('<strong>Oh Snap!</strong> Authentication failed while connecting to Aria2 RPC server. Will retry in 10 secs. You might want to confirm your authentication details by going to Settings > Connection Settings', 'error');
alerts.addAlert('<strong>' + filter('translate')('Oh Snap!') + '</strong> ' +
filter('translate')('Authentication failed while connecting to Aria2 RPC server. Will retry in 10 secs. You might want to confirm your authentication details by going to Settings > Connection Settings', 'error'));
timeout = setTimeout(update, globalTimeout);
return;
}

View File

@ -39,9 +39,6 @@ translations.de_DE = {
'Paused': 'Angehaltene',
'Removed': 'Gelöschte',
'Hide linked meta-data': 'Blende verlinkte Meta-Daten aus',
'Displaying': 'Anzeige',
'of': 'von',
'downloads': 'Downloads',
'Toggle': 'Umschalten',
'Reset filters': 'Filter zurücksetzen',
// starred properties

View File

@ -39,13 +39,14 @@ translations.en_US = {
'Paused': 'Paused',
'Removed': 'Removed',
'Hide linked meta-data': 'Hide linked meta-data',
'Displaying': 'Displaying',
'of': 'of',
'downloads': 'downloads',
'Toggle': 'Toggle',
'Reset filters': 'Reset filters',
// download status
'Verifing': 'Verifing',
'Verify Pending': 'Verify Pending',
// starred properties
'Quick Access Settings': 'Quick Access Settings',
'Save': 'Save',
'Save settings': 'Save settings',
'Currently no download in line to display, use the': 'Currently no download in line to display, use the',
'download button to start downloading files!': 'download button to start downloading files!',
@ -138,7 +139,9 @@ translations.en_US = {
'The last connection attempt was unsuccessful. Trying another configuration': 'The last connection attempt was unsuccessful. Trying another configuration',
'Oh Snap!': 'Oh Snap!',
'Could not connect to the aria2 RPC server. Will retry in 10 secs. You might want to check the connection settings by going to Settings > Connection Settings': 'Could not connect to the aria2 RPC server. Will retry in 10 secs. You might want to check the connection settings by going to Settings > Connection Settings',
'Authentication failed while connecting to Aria2 RPC server. Will retry in 10 secs. You might want to confirm your authentication details by going to Settings > Connection Settings': 'Authentication failed while connecting to Aria2 RPC server. Will retry in 10 secs. You might want to confirm your authentication details by going to Settings > Connection Settings',
'Successfully connected to Aria2 through its remote RPC …': 'Successfully connected to Aria2 through its remote RPC …',
'Successfully connected to Aria2 through remote RPC, however the connection is still insecure. For complete security try adding an authorization secret token while starting Aria2 (through the flag --rpc-secret)': 'Successfully connected to Aria2 through remote RPC, however the connection is still insecure. For complete security try adding an authorization secret token while starting Aria2 (through the flag --rpc-secret)',
'Trying to connect to aria2 using the new connection configuration': 'Trying to connect to aria2 using the new connection configuration',
'Remove {{name}} and associated meta-data?': 'Remove {{name}} and associated meta-data?'
};

View File

@ -54,9 +54,6 @@ translations.es_ES = { // replace en_US to ll_CC, examples: zh_CN, de_AT.
'Paused': 'En Pausa',
'Removed': 'Eliminado',
'Hide linked meta-data': 'Ocultar metadatos adjuntos',
'Displaying': 'Mostrando',
'of': 'de',
'downloads': 'descargas',
'Toggle': 'Conmutar',
'Reset filters': 'Restablecer Filtros',
// starred properties

View File

@ -39,9 +39,6 @@ translations.fr_FR = {
'Paused': 'En Pause',
'Removed': 'Supprimés',
'Hide linked meta-data': 'Cacher les méta-données liées',
'Displaying': 'Affichage de',
'of': 'parmi',
'downloads': 'téléchargements',
'Toggle': 'Basculer',
'Reset filters': 'Réinitialiser les filtres',
// starred properties

View File

@ -39,9 +39,6 @@ translations.it_IT = {
'Paused': 'In pausa',
'Removed': 'Rimossi',
'Hide linked meta-data': 'Nascondi i meta-data collegati',
'Displaying': 'Mostra',
'of': 'di',
'downloads': 'downloads',
'Toggle': 'Cambia',
'Reset filters': 'Reimposta filtri',
// starred properties

View File

@ -39,9 +39,6 @@ translations.pl_PL = {
'Paused': 'Zatrzymane',
'Removed': 'Usunięte',
'Hide linked meta-data': 'Ukryj zalinkowane meta-dane',
'Displaying': 'Wyświetlanie',
'of': 'z',
'downloads': 'pobranych plików',
'Toggle': 'Przełącz',
'Reset filters': 'Reset filtrów',
// starred properties

View File

@ -27,7 +27,7 @@ translations.ru_RU = {
'About': 'Об',
'Displaying': 'Показано',
'of': 'из',
'downloads': 'загрузки',
'downloads': 'загрузок',
'Language': 'Язык',
// download filters
'Download Filters': 'Фильтр Загрузок',
@ -39,9 +39,6 @@ translations.ru_RU = {
'Paused': 'Приостановленные',
'Removed': 'Удаленные',
'Hide linked meta-data': 'Скрыть связанные метаданные',
'Displaying': 'Показано',
'of': 'из',
'downloads': 'загрузок',
'Toggle': 'Переключить',
'Reset filters': 'Сбросить фильтры',
// starred properties

View File

@ -54,13 +54,14 @@ translations.en_US = { // replace en_US to ll_CC, examples: zh_CN, de_AT.
'Paused': '',
'Removed': '',
'Hide linked meta-data': '',
'Displaying': '',
'of': '',
'downloads': '',
'Toggle': '',
'Reset filters': '',
// download status
'Verifing': '',
'Verify Pending': '',
// starred properties
'Quick Access Settings': '',
'Save': '',
'Save settings': '',
'Currently no download in line to display, use the': '',
'download button to start downloading files!': '',
@ -155,10 +156,14 @@ translations.en_US = { // replace en_US to ll_CC, examples: zh_CN, de_AT.
'Oh Snap!': '',
'Could not connect to the aria2 RPC server. Will retry in 10 secs. You might want to check the connection settings by going to Settings > Connection Settings':
'',
'Authentication failed while connecting to Aria2 RPC server. Will retry in 10 secs. You might want to confirm your authentication details by going to Settings > Connection Settings':
'',
'Successfully connected to Aria2 through its remote RPC …':
'',
'Successfully connected to Aria2 through remote RPC, however the connection is still insecure. For complete security try adding an authorization secret token while starting Aria2 (through the flag --rpc-secret)':
'',
'Trying to connect to aria2 using the new connection configuration':
'',
'Remove {{name}} and associated meta-data?': // {{name}} refers to the download name, do not modify.
''
};

View File

@ -39,9 +39,6 @@ translations.th_TH = {
'Paused': 'หยุดอยู่',
'Removed': 'ลบแล้ว',
'Hide linked meta-data': 'ซ่อนข้อมูลเมตาที่เชื่อมโยง',
'Displaying': 'แแสดงดาวน์โหลด',
'of': 'อันใน',
'downloads': 'อันทั้งหมด',
'Toggle': 'สลับ',
'Reset filters': 'รีเซตตัวกรอง',
// starred properties

View File

@ -39,9 +39,6 @@ translations.tr_TR = {
'Paused': 'Duraklatıldı',
'Removed': 'Silindi',
'Hide linked meta-data': 'Bağlı meta verileri gizle',
'Displaying': 'Gösteriliyor',
'of': ' / ',
'downloads': 'Indirme',
'Toggle': 'aç/kapat',
'Reset filters': 'Filtreleri sıfırla',
// starred properties

View File

@ -32,7 +32,7 @@ translations.zh_CN = {
'Language': '语言',
// download filters
'Download Filters': '下载过滤器',
'Running': '下载中',
'Running': '运行中',
'Active': '活动的',
'Waiting': '等待中',
'Complete': '已完成',
@ -42,8 +42,12 @@ translations.zh_CN = {
'Hide linked meta-data': '隐藏连接的元数据',
'Toggle': '反向选择',
'Reset filters': '重置过滤器',
// download status
'Verifing': '正在验证',
'Verify Pending': '等待验证',
// starred properties
'Quick Access Settings': '快速访问设置',
'Save': '保存',
'Save settings': '保存设置',
'Currently no download in line to display, use the': '当前没有可显示的下载项,使用',
'download button to start downloading files!': '按钮来开始下载!',
@ -138,10 +142,14 @@ translations.zh_CN = {
'Oh Snap!': '糟糕!',
'Could not connect to the aria2 RPC server. Will retry in 10 secs. You might want to check the connection settings by going to Settings > Connection Settings':
'无法连接到 Aria2 RPC 服务器将在10秒后重试。您可能需要检查连接设置请前往 设置 > 连接设置',
'Authentication failed while connecting to Aria2 RPC server. Will retry in 10 secs. You might want to confirm your authentication details by going to Settings > Connection Settings':
'连接到 Aria2 RPC 服务器时认证失败将在10秒后重试。您可能需要确认您的身份验证信息请前往 设置 > 连接设置',
'Successfully connected to Aria2 through its remote RPC …':
'通过 RPC 连接到 Aria2 成功!',
'Successfully connected to Aria2 through remote RPC, however the connection is still insecure. For complete security try adding an authorization secret token while starting Aria2 (through the flag --rpc-secret)':
'通过 RPC 连接到 Aria2 成功,但是连接并不安全。要想使用安全连接,尝试在启动 Aria2 时添加一个授权密码令牌(通过 --rpc-secret 参数)',
'Trying to connect to aria2 using the new connection configuration':
'正在尝试使用新的连接配置来连接到 Aria2 ……'
'正在尝试使用新的连接配置来连接到 Aria2 ……',
'Remove {{name}} and associated meta-data?':
'是否删除 {{name}} 和关联的元数据?'
};

View File

@ -32,7 +32,7 @@ translations.zh_TW = {
'Language': '語言',
// download filters
'Download Filters': '下載過濾器',
'Running': '下載中',
'Running': '執行中',
'Active': '活動的',
'Waiting': '等待中',
'Complete': '已完成',
@ -42,8 +42,12 @@ translations.zh_TW = {
'Hide linked meta-data': '隱藏連線的元資料',
'Toggle': '反向選擇',
'Reset filters': '重置過濾器',
// download status
'Verifing': '正在驗證',
'Verify Pending': '等待驗證',
// starred properties
'Quick Access Settings': '快速訪問設定',
'Save': '儲存',
'Save settings': '儲存設定',
'Currently no download in line to display, use the': '當前沒有可顯示的下載項,使用',
'download button to start downloading files!': '按鈕來開始下載!',
@ -138,10 +142,14 @@ translations.zh_TW = {
'Oh Snap!': '糟糕!',
'Could not connect to the aria2 RPC server. Will retry in 10 secs. You might want to check the connection settings by going to Settings > Connection Settings':
'無法連線到 Aria2 RPC 伺服器將在10秒後重試。您可能需要檢查連線設定請前往 設定 > 連線設定',
'Authentication failed while connecting to Aria2 RPC server. Will retry in 10 secs. You might want to confirm your authentication details by going to Settings > Connection Settings':
'連線到 Aria2 RPC 伺服器時認證失敗將在10秒後重試。您可能需要確認您的身份驗證資訊請前往 設定 > 連線設定',
'Successfully connected to Aria2 through its remote RPC …':
'通過 RPC 連線到 Aria2 成功!',
'Successfully connected to Aria2 through remote RPC, however the connection is still insecure. For complete security try adding an authorization secret token while starting Aria2 (through the flag --rpc-secret)':
'通過 RPC 連線到 Aria2 成功,但是連線並不安全。要想使用安全連線,嘗試在啟動 Aria2 時新增一個授權密碼令牌(通過 --rpc-secret 引數)',
'Trying to connect to aria2 using the new connection configuration':
'正在嘗試使用新的連線配置來連線到 Aria2 ……'
'正在嘗試使用新的連線配置來連線到 Aria2 ……',
'Remove {{name}} and associated meta-data?':
'是否刪除 {{name}} 和關聯的元資料?'
};