translate commandRenamer into Polish
This commit is contained in:
parent
159241ba3c
commit
44c03a22c2
|
@ -1,3 +1,4 @@
|
|||
import getTranslations from './i18n/commandRenamer';
|
||||
import wait from './utils/wait';
|
||||
|
||||
// ==UserScript==
|
||||
|
@ -5,13 +6,15 @@ import wait from './utils/wait';
|
|||
// @namespace https://github.com/tribalwarshelp/scripts
|
||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/commandRenamer.js
|
||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/commandRenamer.js
|
||||
// @version 0.4.2
|
||||
// @version 0.2.0
|
||||
// @description Command renamer
|
||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
||||
// @match *://*/game.php*mode=incomings*
|
||||
// @grant none
|
||||
// ==/UserScript==
|
||||
|
||||
const translations = getTranslations();
|
||||
|
||||
const handleSubmit = async (e) => {
|
||||
e.preventDefault();
|
||||
const name = e.target[0].value;
|
||||
|
@ -38,8 +41,8 @@ const handleSubmit = async (e) => {
|
|||
|
||||
const renderUI = () => {
|
||||
const html = `
|
||||
<input type="text" placeholder="Name" />
|
||||
<button type="submit">Rename</button>
|
||||
<input type="text" placeholder="${translations.name}" />
|
||||
<button type="submit">${translations.rename}</button>
|
||||
`;
|
||||
|
||||
const form = document.createElement('form');
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
const translations = {
|
||||
pl_PL: {
|
||||
rename: 'Zmień',
|
||||
name: 'Nazwa',
|
||||
},
|
||||
en_DK: {
|
||||
rename: 'Rename',
|
||||
name: 'Name',
|
||||
},
|
||||
};
|
||||
|
||||
export default () =>
|
||||
translations[window.game_data.locale] || translations.en_DK;
|
Reference in New Issue