mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-15 17:56:07 +01:00
Translate some missing string, fix #629
This commit is contained in:
@@ -695,7 +695,12 @@ class AdminPlugin extends Plugin
|
||||
'ROUTABLE',
|
||||
'NON_ROUTABLE',
|
||||
'PUBLISHED',
|
||||
'NON_PUBLISHED'
|
||||
'NON_PUBLISHED',
|
||||
'PLUGINS',
|
||||
'THEMES',
|
||||
'ALL',
|
||||
'FROM',
|
||||
'TO'
|
||||
];
|
||||
|
||||
foreach($strings as $string) {
|
||||
|
||||
@@ -561,9 +561,12 @@ PLUGIN_ADMIN:
|
||||
TYPE: "Type"
|
||||
FILE_EXTENSION: "File Extension"
|
||||
LEGEND: "Page Legend"
|
||||
MEMCACHE_SERVER: Memcache server
|
||||
MEMCACHE_PORT: Memcache port
|
||||
MEMCACHED_SERVER: Memcache server
|
||||
MEMCACHED_PORT: Memcache port
|
||||
REDIS_SERVER: Redis server
|
||||
REDIS_PORT: Redis port
|
||||
MEMCACHE_SERVER: "Memcache server"
|
||||
MEMCACHE_PORT: "Memcache port"
|
||||
MEMCACHED_SERVER: "Memcache server"
|
||||
MEMCACHED_PORT: "Memcache port"
|
||||
REDIS_SERVER: "Redis server"
|
||||
REDIS_PORT: "Redis port"
|
||||
ALL: "All"
|
||||
FROM: "from"
|
||||
TO: "to"
|
||||
@@ -85,12 +85,19 @@ export default class Updates {
|
||||
.addClass('with-updates')
|
||||
.find('.badge.updates').text(length);
|
||||
|
||||
var type_translation = '';
|
||||
// update all
|
||||
let title = type.charAt(0).toUpperCase() + type.substr(1).toLowerCase();
|
||||
|
||||
if (type === 'plugins') {
|
||||
type_translation = translations.PLUGIN_ADMIN.PLUGINS;
|
||||
} else {
|
||||
type_translation = translations.PLUGIN_ADMIN.THEMES;
|
||||
}
|
||||
|
||||
let updateAll = $(`.grav-update.${type}`);
|
||||
updateAll.css('display', 'block').html(`
|
||||
<p>
|
||||
<a href="#" class="button button-small secondary" data-remodal-target="update-packages" data-packages-slugs="${Object.keys(resources).join()}" data-${singles[index]}-action="start-packages-update">${translations.PLUGIN_ADMIN.UPDATE} All ${title}</a>
|
||||
<a href="#" class="button button-small secondary" data-remodal-target="update-packages" data-packages-slugs="${Object.keys(resources).join()}" data-${singles[index]}-action="start-packages-update">${translations.PLUGIN_ADMIN.UPDATE} ${translations.PLUGIN_ADMIN.ALL} ${type_translation}</a>
|
||||
<i class="fa fa-bullhorn"></i>
|
||||
${length} ${translations.PLUGIN_ADMIN.OF_YOUR} ${type} ${translations.PLUGIN_ADMIN.HAVE_AN_UPDATE_AVAILABLE}
|
||||
</p>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { config } from 'grav-config';
|
||||
import { config, translations } from 'grav-config';
|
||||
import request from '../utils/request';
|
||||
import { Instance as gpm } from '../utils/gpm';
|
||||
|
||||
@@ -121,7 +121,7 @@ class Packages {
|
||||
name = resources.themes[slug].name;
|
||||
}
|
||||
|
||||
list.append(`<li>${name ? name : slug}, from v<strong>${current_version}</strong> to v<strong>${available_version}</strong></li>`);
|
||||
list.append(`<li>${name ? name : slug}, ${translations.PLUGIN_ADMIN.FROM} v<strong>${current_version}</strong> ${translations.PLUGIN_ADMIN.TO} v<strong>${available_version}</strong></li>`);
|
||||
} else {
|
||||
list.append(`<li>${name ? name : slug}</li>`);
|
||||
}
|
||||
@@ -241,7 +241,7 @@ class Packages {
|
||||
name = resources.themes[slug].name;
|
||||
}
|
||||
|
||||
$('.packages-names-list').append(`<li>${name ? name : slug}, from v<strong>${current_version}</strong> to v<strong>${available_version}</strong></li>`);
|
||||
$('.packages-names-list').append(`<li>${name ? name : slug}, ${translations.PLUGIN_ADMIN.FROM} v<strong>${current_version}</strong> ${translations.PLUGIN_ADMIN.TO} v<strong>${available_version}</strong></li>`);
|
||||
} else {
|
||||
$('.packages-names-list').append(`<li>${name ? name : slug}</li>`);
|
||||
}
|
||||
|
||||
28
themes/grav/js/admin.min.js
vendored
28
themes/grav/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
30
themes/grav/js/vendor.min.js
vendored
30
themes/grav/js/vendor.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user