Albirew/nyaa-pantsu
Albirew
/
nyaa-pantsu
Archivé
1
0
Bifurcation 0

Fix most go lint warnings

Cette révision appartient à :
PantsuDev 2017-07-23 15:46:29 +10:00
Parent a931b47bff
révision d9142a73c3
54 fichiers modifiés avec 7161 ajouts et 7275 suppressions

Voir le fichier

@ -1,24 +1,24 @@
{
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module"
},
"rules": {
"no-const-assign": "warn",
"no-this-before-super": "warn",
"no-undef": "warn",
"no-unreachable": "warn",
"no-unused-vars": "warn",
"constructor-super": "warn",
"valid-typeof": "warn",
"indent": ["error", 2]
}
}
"sourceType": "module"
},
"rules": {
"no-const-assign": "warn",
"no-this-before-super": "warn",
"no-undef": "warn",
"no-unreachable": "warn",
"no-unused-vars": "warn",
"constructor-super": "warn",
"valid-typeof": "warn",
"indent": ["error", 2]
}
}

2
.gitignore externe
Voir le fichier

@ -19,4 +19,4 @@ config/config.yml
# emacs temp files
*\#*
*~
*~

25
.htmlhintrc Fichier normal
Voir le fichier

@ -0,0 +1,25 @@
{
"alt-require": true,
"attr-lowercase": true,
"attr-no-duplication": true,
"attr-unsafe-chars": true,
"attr-value-double-quotes": false,
"attr-value-not-empty": false,
"doctype-first": true,
"doctype-html5": true,
"head-script-disabled": true,
"href-abs-or-rel": false,
"id-class-ad-disabled": true,
"id-class-value": "dash",
"id-unique": true,
"inline-script-disabled": true,
"inline-style-disabled": true,
"space-tab-mixed-disabled": "space2",
"spec-char-escape": true,
"src-not-empty": true,
"style-disabled": true,
"tag-pair": true,
"tag-self-close": false,
"tagname-lowercase": true,
"title-require": true
}

Voir le fichier

@ -21,7 +21,7 @@ deploy:
provider: releases
api_key:
secure: Nz2M3ZbQumKGVga/nnZnz1VXikRkGoLXk5FoH4uOl6GF6rlUNmtvJYs34LWF0/CMswBXNhjCggEaMMtZC+j66ZjoAdHBXRfrOb6jisNJRF6FNk7Kob6W3itCEOTvEL/8a+k2fI95cLqOXDLR2tIX03nchb8rDmVALs7P4gQgy2Y7UAo/aa/0G+OhsSJrlQWt0MT9OKGoIXpeKZjOG3wO/YwqfDwRTItuA9DLFoMQ0gwQfgT58t1ullbpM+jISni7rwfK+jUnZHjUH/VHLguVFmL4A1DxWriJXNOrZR+i/eUJ94mWvfI08WR8Qh3UCr58FrKoWvPsu7HnCq0bn6RvQtCKqx5zgv+R+kxKIP+79SVjKZUi1ghswAuwx9+AT6vHgPLXjJLpZj9Ap/KhfnQR6VT3jBT+kEpmv3J+57JcJCyD4ZslT+LGW2ul0uWoGCVVMBdHqMzuC8OSxpKCw6bFNWnLq+JAU08zlJkAAllBKev+LZWiF8GBICKfynRgViy+MKNaMfzIUNlL9UDskaiWP+BL9RXGLJ2FVdeKkzqdAYdYlgdJChQ56KTtRukR7FlOqDXhszIPxJhU9wn9lNXmGvq1FJyo1LRY3HX+5o9lWw+enaswNxFxdLBMXPhF5jehMkImiR4/YS4WdlmHcEfsli9sBOjBQh1iIpCfme77PPU=
script:
script:
- ./package.sh
file: dist/*.zip
skip_cleanup: true

Voir le fichier

@ -16,4 +16,3 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Voir le fichier

@ -21,4 +21,4 @@
"withCompare": true,
"withGenerator": true
}
}
}

Fichier diff supprimé car celui-ci est trop grand Voir la Diff

Fichier diff supprimé car celui-ci est trop grand Voir la Diff

Voir le fichier

@ -1,25 +1,25 @@
define({
ca: {
'Allowed values:' : 'Valors permesos:',
'Compare all with predecessor': 'Comparar tot amb versió anterior',
'compare changes to:' : 'comparar canvis amb:',
'compared to' : 'comparat amb',
'Default value:' : 'Valor per defecte:',
'Description' : 'Descripció',
'Field' : 'Camp',
'General' : 'General',
'Generated with' : 'Generat amb',
'Name' : 'Nom',
'No response values.' : 'Sense valors en la resposta.',
'optional' : 'opcional',
'Parameter' : 'Paràmetre',
'Permission:' : 'Permisos:',
'Response' : 'Resposta',
'Send' : 'Enviar',
'Send a Sample Request' : 'Enviar una petició d\'exemple',
'show up to version:' : 'mostrar versió:',
'Size range:' : 'Tamany de rang:',
'Type' : 'Tipus',
'url' : 'url'
}
ca: {
'Allowed values:': 'Valors permesos:',
'Compare all with predecessor': 'Comparar tot amb versió anterior',
'compare changes to:': 'comparar canvis amb:',
'compared to': 'comparat amb',
'Default value:': 'Valor per defecte:',
'Description': 'Descripció',
'Field': 'Camp',
'General': 'General',
'Generated with': 'Generat amb',
'Name': 'Nom',
'No response values.': 'Sense valors en la resposta.',
'optional': 'opcional',
'Parameter': 'Paràmetre',
'Permission:': 'Permisos:',
'Response': 'Resposta',
'Send': 'Enviar',
'Send a Sample Request': 'Enviar una petició d\'exemple',
'show up to version:': 'mostrar versió:',
'Size range:': 'Tamany de rang:',
'Type': 'Tipus',
'url': 'url'
}
});

Voir le fichier

@ -1,25 +1,25 @@
define({
de: {
'Allowed values:' : 'Erlaubte Werte:',
'Compare all with predecessor': 'Vergleiche alle mit ihren Vorgängern',
'compare changes to:' : 'vergleiche Änderungen mit:',
'compared to' : 'verglichen mit',
'Default value:' : 'Standardwert:',
'Description' : 'Beschreibung',
'Field' : 'Feld',
'General' : 'Allgemein',
'Generated with' : 'Erstellt mit',
'Name' : 'Name',
'No response values.' : 'Keine Rückgabewerte.',
'optional' : 'optional',
'Parameter' : 'Parameter',
'Permission:' : 'Berechtigung:',
'Response' : 'Antwort',
'Send' : 'Senden',
'Send a Sample Request' : 'Eine Beispielanfrage senden',
'show up to version:' : 'zeige bis zur Version:',
'Size range:' : 'Größenbereich:',
'Type' : 'Typ',
'url' : 'url'
}
de: {
'Allowed values:': 'Erlaubte Werte:',
'Compare all with predecessor': 'Vergleiche alle mit ihren Vorgängern',
'compare changes to:': 'vergleiche Änderungen mit:',
'compared to': 'verglichen mit',
'Default value:': 'Standardwert:',
'Description': 'Beschreibung',
'Field': 'Feld',
'General': 'Allgemein',
'Generated with': 'Erstellt mit',
'Name': 'Name',
'No response values.': 'Keine Rückgabewerte.',
'optional': 'optional',
'Parameter': 'Parameter',
'Permission:': 'Berechtigung:',
'Response': 'Antwort',
'Send': 'Senden',
'Send a Sample Request': 'Eine Beispielanfrage senden',
'show up to version:': 'zeige bis zur Version:',
'Size range:': 'Größenbereich:',
'Type': 'Typ',
'url': 'url'
}
});

Voir le fichier

@ -1,25 +1,25 @@
define({
es: {
'Allowed values:' : 'Valores permitidos:',
'Compare all with predecessor': 'Comparar todo con versión anterior',
'compare changes to:' : 'comparar cambios con:',
'compared to' : 'comparado con',
'Default value:' : 'Valor por defecto:',
'Description' : 'Descripción',
'Field' : 'Campo',
'General' : 'General',
'Generated with' : 'Generado con',
'Name' : 'Nombre',
'No response values.' : 'Sin valores en la respuesta.',
'optional' : 'opcional',
'Parameter' : 'Parámetro',
'Permission:' : 'Permisos:',
'Response' : 'Respuesta',
'Send' : 'Enviar',
'Send a Sample Request' : 'Enviar una petición de ejemplo',
'show up to version:' : 'mostrar a versión:',
'Size range:' : 'Tamaño de rango:',
'Type' : 'Tipo',
'url' : 'url'
}
es: {
'Allowed values:': 'Valores permitidos:',
'Compare all with predecessor': 'Comparar todo con versión anterior',
'compare changes to:': 'comparar cambios con:',
'compared to': 'comparado con',
'Default value:': 'Valor por defecto:',
'Description': 'Descripción',
'Field': 'Campo',
'General': 'General',
'Generated with': 'Generado con',
'Name': 'Nombre',
'No response values.': 'Sin valores en la respuesta.',
'optional': 'opcional',
'Parameter': 'Parámetro',
'Permission:': 'Permisos:',
'Response': 'Respuesta',
'Send': 'Enviar',
'Send a Sample Request': 'Enviar una petición de ejemplo',
'show up to version:': 'mostrar a versión:',
'Size range:': 'Tamaño de rango:',
'Type': 'Tipo',
'url': 'url'
}
});

Voir le fichier

@ -1,25 +1,25 @@
define({
fr: {
'Allowed values:' : 'Valeurs autorisées :',
'Compare all with predecessor': 'Tout comparer avec ...',
'compare changes to:' : 'comparer les changements à :',
'compared to' : 'comparer à',
'Default value:' : 'Valeur par défaut :',
'Description' : 'Description',
'Field' : 'Champ',
'General' : 'Général',
'Generated with' : 'Généré avec',
'Name' : 'Nom',
'No response values.' : 'Aucune valeur de réponse.',
'optional' : 'optionnel',
'Parameter' : 'Paramètre',
'Permission:' : 'Permission :',
'Response' : 'Réponse',
'Send' : 'Envoyer',
'Send a Sample Request' : 'Envoyer une requête représentative',
'show up to version:' : 'Montrer à partir de la version :',
'Size range:' : 'Ordre de grandeur :',
'Type' : 'Type',
'url' : 'url'
}
fr: {
'Allowed values:': 'Valeurs autorisées :',
'Compare all with predecessor': 'Tout comparer avec ...',
'compare changes to:': 'comparer les changements à :',
'compared to': 'comparer à',
'Default value:': 'Valeur par défaut :',
'Description': 'Description',
'Field': 'Champ',
'General': 'Général',
'Generated with': 'Généré avec',
'Name': 'Nom',
'No response values.': 'Aucune valeur de réponse.',
'optional': 'optionnel',
'Parameter': 'Paramètre',
'Permission:': 'Permission :',
'Response': 'Réponse',
'Send': 'Envoyer',
'Send a Sample Request': 'Envoyer une requête représentative',
'show up to version:': 'Montrer à partir de la version :',
'Size range:': 'Ordre de grandeur :',
'Type': 'Type',
'url': 'url'
}
});

Voir le fichier

@ -1,25 +1,25 @@
define({
it: {
'Allowed values:' : 'Valori permessi:',
'Compare all with predecessor': 'Confronta tutto con versioni precedenti',
'compare changes to:' : 'confronta modifiche con:',
'compared to' : 'confrontato con',
'Default value:' : 'Valore predefinito:',
'Description' : 'Descrizione',
'Field' : 'Campo',
'General' : 'Generale',
'Generated with' : 'Creato con',
'Name' : 'Nome',
'No response values.' : 'Nessun valore di risposta.',
'optional' : 'opzionale',
'Parameter' : 'Parametro',
'Permission:' : 'Permessi:',
'Response' : 'Risposta',
'Send' : 'Invia',
'Send a Sample Request' : 'Invia una richiesta di esempio',
'show up to version:' : 'mostra alla versione:',
'Size range:' : 'Intervallo dimensione:',
'Type' : 'Tipo',
'url' : 'url'
}
it: {
'Allowed values:': 'Valori permessi:',
'Compare all with predecessor': 'Confronta tutto con versioni precedenti',
'compare changes to:': 'confronta modifiche con:',
'compared to': 'confrontato con',
'Default value:': 'Valore predefinito:',
'Description': 'Descrizione',
'Field': 'Campo',
'General': 'Generale',
'Generated with': 'Creato con',
'Name': 'Nome',
'No response values.': 'Nessun valore di risposta.',
'optional': 'opzionale',
'Parameter': 'Parametro',
'Permission:': 'Permessi:',
'Response': 'Risposta',
'Send': 'Invia',
'Send a Sample Request': 'Invia una richiesta di esempio',
'show up to version:': 'mostra alla versione:',
'Size range:': 'Intervallo dimensione:',
'Type': 'Tipo',
'url': 'url'
}
});

Voir le fichier

@ -1,50 +1,50 @@
define([
'./locales/ca.js',
'./locales/de.js',
'./locales/es.js',
'./locales/fr.js',
'./locales/it.js',
'./locales/nl.js',
'./locales/pl.js',
'./locales/pt_br.js',
'./locales/ro.js',
'./locales/ru.js',
'./locales/tr.js',
'./locales/vi.js',
'./locales/zh.js',
'./locales/zh_cn.js'
], function() {
var langId = (navigator.language || navigator.userLanguage).toLowerCase().replace('-', '_');
var language = langId.substr(0, 2);
var locales = {};
'./locales/ca.js',
'./locales/de.js',
'./locales/es.js',
'./locales/fr.js',
'./locales/it.js',
'./locales/nl.js',
'./locales/pl.js',
'./locales/pt_br.js',
'./locales/ro.js',
'./locales/ru.js',
'./locales/tr.js',
'./locales/vi.js',
'./locales/zh.js',
'./locales/zh_cn.js'
], function () {
var langId = (navigator.language || navigator.userLanguage).toLowerCase().replace('-', '_');
var language = langId.substr(0, 2);
var locales = {};
for (index in arguments) {
for (property in arguments[index])
locales[property] = arguments[index][property];
}
if ( ! locales['en'])
locales['en'] = {};
for (index in arguments) {
for (property in arguments[index])
locales[property] = arguments[index][property];
}
if (!locales['en'])
locales['en'] = {};
if ( ! locales[langId] && ! locales[language])
language = 'en';
if (!locales[langId] && !locales[language])
language = 'en';
var locale = (locales[langId] ? locales[langId] : locales[language]);
var locale = (locales[langId] ? locales[langId] : locales[language]);
function __(text) {
var index = locale[text];
if (index === undefined)
return text;
return index;
};
function __(text) {
var index = locale[text];
if (index === undefined)
return text;
return index;
};
function setLanguage(language) {
locale = locales[language];
}
function setLanguage(language) {
locale = locales[language];
}
return {
__ : __,
locales : locales,
locale : locale,
setLanguage: setLanguage
};
return {
__: __,
locales: locales,
locale: locale,
setLanguage: setLanguage
};
});

Voir le fichier

@ -1,25 +1,25 @@
define({
nl: {
'Allowed values:' : 'Toegestane waarden:',
'Compare all with predecessor': 'Vergelijk alle met voorgaande versie',
'compare changes to:' : 'vergelijk veranderingen met:',
'compared to' : 'vergelijk met',
'Default value:' : 'Standaard waarde:',
'Description' : 'Omschrijving',
'Field' : 'Veld',
'General' : 'Algemeen',
'Generated with' : 'Gegenereerd met',
'Name' : 'Naam',
'No response values.' : 'Geen response waardes.',
'optional' : 'optioneel',
'Parameter' : 'Parameter',
'Permission:' : 'Permissie:',
'Response' : 'Antwoorden',
'Send' : 'Sturen',
'Send a Sample Request' : 'Stuur een sample aanvragen',
'show up to version:' : 'toon tot en met versie:',
'Size range:' : 'Maatbereik:',
'Type' : 'Type',
'url' : 'url'
}
nl: {
'Allowed values:': 'Toegestane waarden:',
'Compare all with predecessor': 'Vergelijk alle met voorgaande versie',
'compare changes to:': 'vergelijk veranderingen met:',
'compared to': 'vergelijk met',
'Default value:': 'Standaard waarde:',
'Description': 'Omschrijving',
'Field': 'Veld',
'General': 'Algemeen',
'Generated with': 'Gegenereerd met',
'Name': 'Naam',
'No response values.': 'Geen response waardes.',
'optional': 'optioneel',
'Parameter': 'Parameter',
'Permission:': 'Permissie:',
'Response': 'Antwoorden',
'Send': 'Sturen',
'Send a Sample Request': 'Stuur een sample aanvragen',
'show up to version:': 'toon tot en met versie:',
'Size range:': 'Maatbereik:',
'Type': 'Type',
'url': 'url'
}
});

Voir le fichier

@ -1,25 +1,25 @@
define({
pl: {
'Allowed values:' : 'Dozwolone wartości:',
'Compare all with predecessor': 'Porównaj z poprzednimi wersjami',
'compare changes to:' : 'porównaj zmiany do:',
'compared to' : 'porównaj do:',
'Default value:' : 'Wartość domyślna:',
'Description' : 'Opis',
'Field' : 'Pole',
'General' : 'Generalnie',
'Generated with' : 'Wygenerowano z',
'Name' : 'Nazwa',
'No response values.' : 'Brak odpowiedzi.',
'optional' : 'opcjonalny',
'Parameter' : 'Parametr',
'Permission:' : 'Uprawnienia:',
'Response' : 'Odpowiedź',
'Send' : 'Wyślij',
'Send a Sample Request' : 'Wyślij przykładowe żądanie',
'show up to version:' : 'pokaż do wersji:',
'Size range:' : 'Zakres rozmiaru:',
'Type' : 'Typ',
'url' : 'url'
}
pl: {
'Allowed values:': 'Dozwolone wartości:',
'Compare all with predecessor': 'Porównaj z poprzednimi wersjami',
'compare changes to:': 'porównaj zmiany do:',
'compared to': 'porównaj do:',
'Default value:': 'Wartość domyślna:',
'Description': 'Opis',
'Field': 'Pole',
'General': 'Generalnie',
'Generated with': 'Wygenerowano z',
'Name': 'Nazwa',
'No response values.': 'Brak odpowiedzi.',
'optional': 'opcjonalny',
'Parameter': 'Parametr',
'Permission:': 'Uprawnienia:',
'Response': 'Odpowiedź',
'Send': 'Wyślij',
'Send a Sample Request': 'Wyślij przykładowe żądanie',
'show up to version:': 'pokaż do wersji:',
'Size range:': 'Zakres rozmiaru:',
'Type': 'Typ',
'url': 'url'
}
});

Voir le fichier

@ -1,25 +1,25 @@
define({
'pt_br': {
'Allowed values:' : 'Valores permitidos:',
'Compare all with predecessor': 'Compare todos com antecessores',
'compare changes to:' : 'comparar alterações com:',
'compared to' : 'comparado com',
'Default value:' : 'Valor padrão:',
'Description' : 'Descrição',
'Field' : 'Campo',
'General' : 'Geral',
'Generated with' : 'Gerado com',
'Name' : 'Nome',
'No response values.' : 'Sem valores de resposta.',
'optional' : 'opcional',
'Parameter' : 'Parâmetro',
'Permission:' : 'Permissão:',
'Response' : 'Resposta',
'Send' : 'Enviar',
'Send a Sample Request' : 'Enviar um Exemplo de Pedido',
'show up to version:' : 'aparecer para a versão:',
'Size range:' : 'Faixa de tamanho:',
'Type' : 'Tipo',
'url' : 'url'
}
'pt_br': {
'Allowed values:': 'Valores permitidos:',
'Compare all with predecessor': 'Compare todos com antecessores',
'compare changes to:': 'comparar alterações com:',
'compared to': 'comparado com',
'Default value:': 'Valor padrão:',
'Description': 'Descrição',
'Field': 'Campo',
'General': 'Geral',
'Generated with': 'Gerado com',
'Name': 'Nome',
'No response values.': 'Sem valores de resposta.',
'optional': 'opcional',
'Parameter': 'Parâmetro',
'Permission:': 'Permissão:',
'Response': 'Resposta',
'Send': 'Enviar',
'Send a Sample Request': 'Enviar um Exemplo de Pedido',
'show up to version:': 'aparecer para a versão:',
'Size range:': 'Faixa de tamanho:',
'Type': 'Tipo',
'url': 'url'
}
});

Voir le fichier

@ -1,25 +1,25 @@
define({
ro: {
'Allowed values:' : 'Valori permise:',
'Compare all with predecessor': 'Compară toate cu versiunea precedentă',
'compare changes to:' : 'compară cu versiunea:',
'compared to' : 'comparat cu',
'Default value:' : 'Valoare implicită:',
'Description' : 'Descriere',
'Field' : 'Câmp',
'General' : 'General',
'Generated with' : 'Generat cu',
'Name' : 'Nume',
'No response values.' : 'Nici o valoare returnată.',
'optional' : 'opțional',
'Parameter' : 'Parametru',
'Permission:' : 'Permisiune:',
'Response' : 'Răspuns',
'Send' : 'Trimite',
'Send a Sample Request' : 'Trimite o cerere de probă',
'show up to version:' : 'arată până la versiunea:',
'Size range:' : 'Interval permis:',
'Type' : 'Tip',
'url' : 'url'
}
ro: {
'Allowed values:': 'Valori permise:',
'Compare all with predecessor': 'Compară toate cu versiunea precedentă',
'compare changes to:': 'compară cu versiunea:',
'compared to': 'comparat cu',
'Default value:': 'Valoare implicită:',
'Description': 'Descriere',
'Field': 'Câmp',
'General': 'General',
'Generated with': 'Generat cu',
'Name': 'Nume',
'No response values.': 'Nici o valoare returnată.',
'optional': 'opțional',
'Parameter': 'Parametru',
'Permission:': 'Permisiune:',
'Response': 'Răspuns',
'Send': 'Trimite',
'Send a Sample Request': 'Trimite o cerere de probă',
'show up to version:': 'arată până la versiunea:',
'Size range:': 'Interval permis:',
'Type': 'Tip',
'url': 'url'
}
});

Voir le fichier

@ -1,25 +1,25 @@
define({
ru: {
'Allowed values:' : 'Допустимые значения:',
'Compare all with predecessor': 'Сравнить с предыдущей версией',
'compare changes to:' : 'сравнить с:',
'compared to' : 'в сравнении с',
'Default value:' : 'По умолчанию:',
'Description' : 'Описание',
'Field' : 'Название',
'General' : 'Общая информация',
'Generated with' : 'Сгенерировано с помощью',
'Name' : 'Название',
'No response values.' : 'Нет значений для ответа.',
'optional' : 'необязательный',
'Parameter' : 'Параметр',
'Permission:' : 'Разрешено:',
'Response' : 'Ответ',
'Send' : 'Отправить',
'Send a Sample Request' : 'Отправить тестовый запрос',
'show up to version:' : 'показать версию:',
'Size range:' : 'Ограничения:',
'Type' : 'Тип',
'url' : 'URL'
}
ru: {
'Allowed values:': 'Допустимые значения:',
'Compare all with predecessor': 'Сравнить с предыдущей версией',
'compare changes to:': 'сравнить с:',
'compared to': 'в сравнении с',
'Default value:': 'По умолчанию:',
'Description': 'Описание',
'Field': 'Название',
'General': 'Общая информация',
'Generated with': 'Сгенерировано с помощью',
'Name': 'Название',
'No response values.': 'Нет значений для ответа.',
'optional': 'необязательный',
'Parameter': 'Параметр',
'Permission:': 'Разрешено:',
'Response': 'Ответ',
'Send': 'Отправить',
'Send a Sample Request': 'Отправить тестовый запрос',
'show up to version:': 'показать версию:',
'Size range:': 'Ограничения:',
'Type': 'Тип',
'url': 'URL'
}
});

Voir le fichier

@ -1,25 +1,25 @@
define({
tr: {
'Allowed values:' : 'İzin verilen değerler:',
'Compare all with predecessor': 'Tümünü öncekiler ile karşılaştır',
'compare changes to:' : 'değişiklikleri karşılaştır:',
'compared to' : 'karşılaştır',
'Default value:' : 'Varsayılan değer:',
'Description' : 'Açıklama',
'Field' : 'Alan',
'General' : 'Genel',
'Generated with' : 'Oluşturan',
'Name' : 'İsim',
'No response values.' : 'Dönüş verisi yok.',
'optional' : 'opsiyonel',
'Parameter' : 'Parametre',
'Permission:' : 'İzin:',
'Response' : 'Dönüş',
'Send' : 'Gönder',
'Send a Sample Request' : 'Örnek istek gönder',
'show up to version:' : 'bu versiyona kadar göster:',
'Size range:' : 'Boyut aralığı:',
'Type' : 'Tip',
'url' : 'url'
}
tr: {
'Allowed values:': 'İzin verilen değerler:',
'Compare all with predecessor': 'Tümünü öncekiler ile karşılaştır',
'compare changes to:': 'değişiklikleri karşılaştır:',
'compared to': 'karşılaştır',
'Default value:': 'Varsayılan değer:',
'Description': 'Açıklama',
'Field': 'Alan',
'General': 'Genel',
'Generated with': 'Oluşturan',
'Name': 'İsim',
'No response values.': 'Dönüş verisi yok.',
'optional': 'opsiyonel',
'Parameter': 'Parametre',
'Permission:': 'İzin:',
'Response': 'Dönüş',
'Send': 'Gönder',
'Send a Sample Request': 'Örnek istek gönder',
'show up to version:': 'bu versiyona kadar göster:',
'Size range:': 'Boyut aralığı:',
'Type': 'Tip',
'url': 'url'
}
});

Voir le fichier

@ -1,25 +1,25 @@
define({
vi: {
'Allowed values:' : 'Giá trị chấp nhận:',
'Compare all with predecessor': 'So sánh với tất cả phiên bản trước',
'compare changes to:' : 'so sánh sự thay đổi với:',
'compared to' : 'so sánh với',
'Default value:' : 'Giá trị mặc định:',
'Description' : 'Chú thích',
'Field' : 'Trường dữ liệu',
'General' : 'Tổng quan',
'Generated with' : 'Được tạo bởi',
'Name' : 'Tên',
'No response values.' : 'Không có kết quả trả về.',
'optional' : 'Tùy chọn',
'Parameter' : 'Tham số',
'Permission:' : 'Quyền hạn:',
'Response' : 'Kết quả',
'Send' : 'Gửi',
'Send a Sample Request' : 'Gửi một yêu cầu mẫu',
'show up to version:' : 'hiển thị phiên bản:',
'Size range:' : 'Kích cỡ:',
'Type' : 'Kiểu',
'url' : 'liên kết'
}
vi: {
'Allowed values:': 'Giá trị chấp nhận:',
'Compare all with predecessor': 'So sánh với tất cả phiên bản trước',
'compare changes to:': 'so sánh sự thay đổi với:',
'compared to': 'so sánh với',
'Default value:': 'Giá trị mặc định:',
'Description': 'Chú thích',
'Field': 'Trường dữ liệu',
'General': 'Tổng quan',
'Generated with': 'Được tạo bởi',
'Name': 'Tên',
'No response values.': 'Không có kết quả trả về.',
'optional': 'Tùy chọn',
'Parameter': 'Tham số',
'Permission:': 'Quyền hạn:',
'Response': 'Kết quả',
'Send': 'Gửi',
'Send a Sample Request': 'Gửi một yêu cầu mẫu',
'show up to version:': 'hiển thị phiên bản:',
'Size range:': 'Kích cỡ:',
'Type': 'Kiểu',
'url': 'liên kết'
}
});

Voir le fichier

@ -1,25 +1,25 @@
define({
zh: {
'Allowed values:' : '允許值:',
'Compare all with predecessor': '預先比較所有',
'compare changes to:' : '比較變更:',
'compared to' : '對比',
'Default value:' : '默認值:',
'Description' : '描述',
'Field' : '字段',
'General' : '概括',
'Generated with' : '生成工具',
'Name' : '名稱',
'No response values.' : '無對應資料.',
'optional' : '選項',
'Parameter' : '參數',
'Permission:' : '允許:',
'Response' : '回應',
'Send' : '發送',
'Send a Sample Request' : '發送試用需求',
'show up to version:' : '顯示到版本:',
'Size range:' : '尺寸範圍:',
'Type' : '類型',
'url' : '網址'
}
zh: {
'Allowed values:': '允許值:',
'Compare all with predecessor': '預先比較所有',
'compare changes to:': '比較變更:',
'compared to': '對比',
'Default value:': '默認值:',
'Description': '描述',
'Field': '字段',
'General': '概括',
'Generated with': '生成工具',
'Name': '名稱',
'No response values.': '無對應資料.',
'optional': '選項',
'Parameter': '參數',
'Permission:': '允許:',
'Response': '回應',
'Send': '發送',
'Send a Sample Request': '發送試用需求',
'show up to version:': '顯示到版本:',
'Size range:': '尺寸範圍:',
'Type': '類型',
'url': '網址'
}
});

Voir le fichier

@ -1,25 +1,25 @@
define({
'zh_cn': {
'Allowed values:' : '允许值:',
'Compare all with predecessor': '与所有较早的比较',
'compare changes to:' : '将当前版本与指定版本比较:',
'compared to' : '相比于',
'Default value:' : '默认值:',
'Description' : '描述',
'Field' : '字段',
'General' : '概要',
'Generated with' : '基于',
'Name' : '名称',
'No response values.' : '无返回值.',
'optional' : '可选',
'Parameter' : '参数',
'Permission:' : '权限:',
'Response' : '返回',
'Send' : '发送',
'Send a Sample Request' : '发送示例请求',
'show up to version:' : '显示到指定版本:',
'Size range:' : '取值范围:',
'Type' : '类型',
'url' : '网址'
}
'zh_cn': {
'Allowed values:': '允许值:',
'Compare all with predecessor': '与所有较早的比较',
'compare changes to:': '将当前版本与指定版本比较:',
'compared to': '相比于',
'Default value:': '默认值:',
'Description': '描述',
'Field': '字段',
'General': '概要',
'Generated with': '基于',
'Name': '名称',
'No response values.': '无返回值.',
'optional': '可选',
'Parameter': '参数',
'Permission:': '权限:',
'Response': '返回',
'Send': '发送',
'Send a Sample Request': '发送示例请求',
'show up to version:': '显示到指定版本:',
'Size range:': '取值范围:',
'Type': '类型',
'url': '网址'
}
});

Fichier diff supprimé car celui-ci est trop grand Voir la Diff

Voir le fichier

@ -13,8 +13,11 @@ import (
var config *Config
var once sync.Once
// Configpaths default configuration file paths
var Configpaths = []string{"config/config.yml", "config/default_config.yml"}
// Get config variable
func Get() *Config {
once.Do(func() {
config = &Config{}

Voir le fichier

@ -2,4 +2,4 @@
# Please, do not change default_config, create your own config.yml
# You do not have to change every values, just set here what you want to edit
# For example, if you just want to change the port, just write:
#port: 9998
#port: 9998

Voir le fichier

@ -58,4 +58,4 @@
* }
*
* @apiUse NotFoundError
*/
*/

Voir le fichier

@ -54,7 +54,7 @@ func getTorrentList(c *gin.Context) (torrents []models.Torrent, createdAsTime ti
}
if userID != "" {
userIDnum := 0
var userIDnum int
userIDnum, err = strconv.Atoi(html.EscapeString(userID))
// Should we have a feed for anonymous uploads?
if err != nil || userIDnum == 0 {

Voir le fichier

@ -17,7 +17,7 @@ import (
// RSSTorznabHandler : Controller for displaying rss feed, accepting common search arguments
func RSSTorznabHandler(c *gin.Context) {
t := c.Query("t")
rss := ""
var rss string
title := "Nyaa Pantsu"
if config.IsSukebei() {
title = "Sukebei Pantsu"

Voir le fichier

@ -11,7 +11,7 @@ import (
"github.com/gin-gonic/gin"
)
// Middleware for managing errors on status
// ErrorMiddleware for managing errors on status
func ErrorMiddleware() gin.HandlerFunc {
return func(c *gin.Context) {
c.Next()

Voir le fichier

@ -113,7 +113,7 @@ func torrentManyAction(c *gin.Context) {
}
/* Changes are done, we save */
_, err := torrent.UpdateUnscope()
_, err = torrent.UpdateUnscope()
if err == nil {
if torrent.Uploader == nil {
torrent.Uploader = &models.User{}

Voir le fichier

@ -14,7 +14,7 @@ func TorrentReassignModPanel(c *gin.Context) {
templates.Form(c, "admin/reassign.jet.html", torrentValidator.ReassignForm{})
}
// ExecuteAction : Function for applying the changes from ReassignForm
// ExecuteReassign : Function for applying the changes from ReassignForm
func ExecuteReassign(f *torrentValidator.ReassignForm) (int, error) {
var toBeChanged []uint
var err error

Voir le fichier

@ -17,13 +17,13 @@ import (
func SeePublicSettingsHandler(c *gin.Context) {
_, Tlang := publicSettings.GetTfuncAndLanguageFromRequest(c)
availableLanguages := publicSettings.GetAvailableLanguages()
languagesJson := templates.LanguagesJSONResponse{Tlang.Tag, availableLanguages}
languagesJSON := templates.LanguagesJSONResponse{Tlang.Tag, availableLanguages}
contentType := c.Request.Header.Get("Content-Type")
if contentType == "application/json" {
c.Header("Content-Type", "application/json")
c.JSON(http.StatusOK, languagesJson)
c.JSON(http.StatusOK, languagesJSON)
} else {
templates.Form(c, "site/user/public/settings.jet.html", languagesJson)
templates.Form(c, "site/user/public/settings.jet.html", languagesJSON)
}
}

Voir le fichier

@ -4,4 +4,4 @@ You can use this API without being logged or any token API
## Except for Upload
When you upload, you have to provide your username and api token!
When you upload, you have to provide your username and API token!

Voir le fichier

@ -579,7 +579,7 @@
"id": "moderation",
"translation": "Moderation"
},
{
{
"id": "who_is_renchon",
"translation": "Wer zum Teufel ist <span lang=\"ja\">れんちょん</span>?"
},

Voir le fichier

@ -1440,16 +1440,16 @@
"translation": "%s must be less than the current Date & Time"
},
{
"id":"error_less_array",
"translation":"%s must contain less than %s items"
"id": "error_less_array",
"translation": "%s must contain less than %s items"
},
{
"id": "error_less_length",
"translation": "%s must be less than %s in length"
},
{
"id":"error_less_number",
"translation":"%s must be less than %s"
"id": "error_less_number",
"translation": "%s must be less than %s"
},
{
"id": "error_less_equal_date",
@ -1476,35 +1476,35 @@
"translation": "%s must be equal or less to %s"
},
{
"id":"error_max_length",
"translation":"Maximal length of %s required for the input: %s"
"id": "error_max_length",
"translation": "Maximal length of %s required for the input: %s"
},
{
"id":"error_max_number",
"translation":"%s must be %s or less"
"id": "error_max_number",
"translation": "%s must be %s or less"
},
{
"id":"error_max_array",
"translation":"%s must contain at maximum %s items"
"id": "error_max_array",
"translation": "%s must contain at maximum %s items"
},
{
"id":"error_length",
"translation":"Length of %s required for the input: %s"
"id": "error_length",
"translation": "Length of %s required for the input: %s"
},
{
"id":"error_equal",
"id": "error_equal",
"translation": "%s is not equal to %s"
},
{
"id":"error_same_value",
"id": "error_same_value",
"translation": "Field '%s' must have the same value as the field '%s'"
},
{
"id":"error_field",
"id": "error_field",
"translation": "Unexpected error on field: %s"
},
{
"id":"error_not_equal",
"id": "error_not_equal",
"translation": "%s should not be equal to %s"
},
{
@ -1680,7 +1680,7 @@
"translation": "No username/password entered"
},
{
"id":"account_banned",
"id": "account_banned",
"translation": "Account banned"
},
{

Voir le fichier

@ -1,4 +1,4 @@
[
[
{
"id": "rules",
"translation": "Règlement"
@ -1437,7 +1437,7 @@
},
{
"id": "error_less_array",
"translation":"%s doit contenir moins de %s items"
"translation": "%s doit contenir moins de %s items"
},
{
"id": "error_less_length",
@ -1445,7 +1445,7 @@
},
{
"id": "error_less_number",
"translation":"%s doit être inférieur à %s"
"translation": "%s doit être inférieur à %s"
},
{
"id": "error_less_equal_date",

Voir le fichier

@ -1364,11 +1364,11 @@
"translation": "Minimal length of %s required for the input: %s"
},
{
"id":"error_max_length",
"translation":"Maximal length of %s required for the input: %s"
"id": "error_max_length",
"translation": "Maximal length of %s required for the input: %s"
},
{
"id":"error_same_value",
"id": "error_same_value",
"translation": "Must be same %s"
},
{

Fichier diff supprimé car celui-ci est trop grand Voir la Diff

Voir le fichier

@ -548,7 +548,7 @@
"translation": "Real Life"
},
{
"id": "real_life_photobooks_and_pictures",
"id": "real_life_photobooks_and_pictures",
"translation": "Real Life - Fotoboeken en Afbeeldingen"
},
{

Fichier diff supprimé car celui-ci est trop grand Voir la Diff

Fichier diff supprimé car celui-ci est trop grand Voir la Diff

Fichier diff supprimé car celui-ci est trop grand Voir la Diff

Voir le fichier

@ -339,7 +339,7 @@
"id": "all_categories",
"translation": "ทุกหมวดหมู่"
},
{
{
"id": "select_a_torrent_category",
"translation": "เลือกหมวดหมู่ทอร์เรนท์"
},
@ -651,7 +651,7 @@
"id": "delete",
"translation": "ลบ"
},
{
{
"id": "website_link",
"translation": "ลิงค์เว็บ"
},
@ -726,7 +726,7 @@
{
"id": "server_status_link",
"translation": "สามารถดูสถานะของเซิร์ฟเวอร์ได้ที่นี่"
},
},
{
"id": "no_database_dumps_available",
"translation": "ยังไม่มีไฟล์ดัมพ์ฐานข้อมูลในขณะนี้"

Voir le fichier

@ -6,6 +6,7 @@ import (
"github.com/patrickmn/go-cache"
)
// C global cache variable
var C *cache.Cache
func init() {

Voir le fichier

@ -12,10 +12,12 @@ type Category struct {
Name string
}
// Cateogories is a struct defining an array of categories
// Categories is a struct defining an array of categories
type Categories []Category
var categories Categories
// Index variable
var Index map[string]int
// InitCategories init the categories and index variables. Exported for tests

Voir le fichier

@ -159,7 +159,7 @@ func setUserToContext(c *gin.Context, val *models.User) {
context.Set(c.Request, UserContextKey, val)
}
// RetrieveUser retrieves a user.
// RetrieveUserFromRequest retrieves a user.
func RetrieveUserFromRequest(c *gin.Context, id uint) (*models.User, bool, uint, int, error) {
var user models.User
var currentUserID uint

Voir le fichier

@ -13,7 +13,7 @@ import (
"github.com/gorilla/feeds"
)
// private wrapper around the RssFeed which gives us the <rss>..</rss> xml
// rssFeedXML private wrapper around the RssFeed which gives us the <rss>..</rss> xml
type rssFeedXML struct {
XMLName xml.Name `xml:"rss"`
Xmlns string `xml:"xmlns:torznab,attr,omitempty"`
@ -23,6 +23,7 @@ type rssFeedXML struct {
Caps *RssCaps `xml:"caps,omitempty"`
}
// RssImage RSS image struct
type RssImage struct {
XMLName xml.Name `xml:"image"`
URL string `xml:"url"`
@ -32,6 +33,7 @@ type RssImage struct {
Height int `xml:"height,omitempty"`
}
// RssTextInput RSS text struct
type RssTextInput struct {
XMLName xml.Name `xml:"textInput"`
Title string `xml:"title"`
@ -40,11 +42,13 @@ type RssTextInput struct {
Link string `xml:"link"`
}
// RssMagnetLink RSS struct for magnet links
type RssMagnetLink struct {
XMLName xml.Name `xml:"link"`
Text string `xml:",cdata"`
}
// RssFeed RSS feed struct
type RssFeed struct {
XMLName xml.Name `xml:"channel"`
Xmlns string `xml:"-"`
@ -70,6 +74,7 @@ type RssFeed struct {
Items []*RssItem
}
// RssItem struct for rss feed items
type RssItem struct {
XMLName xml.Name `xml:"item"`
Title string `xml:"title"` // required
@ -86,6 +91,7 @@ type RssItem struct {
Torznab []*RssTorznab
}
// RssCaps xml struct for torznab caps
type RssCaps struct {
XMLName xml.Name `xml:"caps"`
Server *RssServer `xml:"server,omitempty"`
@ -95,6 +101,7 @@ type RssCaps struct {
Categories *RssCategories `xml:"categories,omitempty"`
}
// RssServer basic server information
type RssServer struct {
XMLName xml.Name `xml:"server"`
Xmlns string `xml:"xmlns,attr"`
@ -106,18 +113,21 @@ type RssServer struct {
Image string `xml:"image,attr"`
}
// RssLimits struct for max results
type RssLimits struct {
XMLName xml.Name `xml:"limits"`
Max string `xml:"max,attr"`
Default string `xml:"default,attr"`
}
// RssRegistration torznab registration information
type RssRegistration struct {
XMLName xml.Name `xml:"registration"`
Available string `xml:"available,attr"`
Open string `xml:"open,attr"`
}
// RssSearching struct for supported search types
type RssSearching struct {
XMLName xml.Name `xml:"searching"`
Search *RssSearch `xml:"search,omitempty"`
@ -125,16 +135,19 @@ type RssSearching struct {
MovieSearch *RssSearch `xml:"movie-search,omitempty"`
}
// RssSearch struct for supported searching params
type RssSearch struct {
Available string `xml:"available,attr"`
SupportedParams string `xml:"supportedParams,attr,omitempty"`
}
// RssCategories categories for rss
type RssCategories struct {
XMLName xml.Name `xml:"categories"`
Category []*RssCategoryTorznab
}
// RssCategoryTorznab categories for torznab
type RssCategoryTorznab struct {
XMLName xml.Name `xml:"category"`
ID string `xml:"id,attr"`
@ -143,6 +156,7 @@ type RssCategoryTorznab struct {
Description string `xml:"description,attr,omitempty"`
}
// RssSubCat sub category
type RssSubCat struct {
XMLName xml.Name `xml:"subcat"`
ID string `xml:"id,attr"`
@ -150,6 +164,7 @@ type RssSubCat struct {
Description string `xml:"description,attr,omitempty"`
}
// RssTorrent item for torrents
type RssTorrent struct {
XMLName xml.Name `xml:"torrent"`
Xmlns string `xml:"xmlns,attr"`
@ -159,6 +174,7 @@ type RssTorrent struct {
MagnetURI string `xml:"magnetUri,omitempty"`
}
// RssTorznab feed for torznab
type RssTorznab struct {
XMLName xml.Name `xml:"torznab:attr,omitempty"`
Name string `xml:"name,attr,omitempty"`
@ -171,6 +187,7 @@ type RssCategory struct {
Domain string `xml:"domain"`
}
// RssEnclosure enclosure for downloads
type RssEnclosure struct {
//RSS 2.0 <enclosure url="http://example.com/file.mp3" length="123456789" type="audio/mpeg" />
XMLName xml.Name `xml:"enclosure"`
@ -179,6 +196,7 @@ type RssEnclosure struct {
Type string `xml:"type,attr"`
}
// Rss struct
type Rss struct {
*feeds.Feed
}
@ -241,22 +259,22 @@ func (r *Rss) RssFeed() *RssFeed {
return channel
}
// FeedXml : return an XML-Ready object for an Rss object
func (r *Rss) FeedXml() interface{} {
// FeedXML : return an XML-Ready object for an Rss object
func (r *Rss) FeedXML() interface{} {
// only generate version 2.0 feeds for now
return r.RssFeed().FeedXml()
return r.RssFeed().FeedXML()
}
// FeedXml : return an XML-ready object for an RssFeed object
func (r *RssFeed) FeedXml() interface{} {
// FeedXML : return an XML-ready object for an RssFeed object
func (r *RssFeed) FeedXML() interface{} {
if r.Xmlns != "" {
return &rssFeedXML{Version: "2.0", Encoding: "UTF-8", Channel: r, Xmlns: r.Xmlns}
}
return &rssFeedXML{Version: "2.0", Encoding: "UTF-8", Channel: r}
}
// FeedXml : return an XML-ready object for an RssFeed object
func (r *RssCaps) FeedXml() interface{} {
// FeedXML : return an XML-ready object for an RssFeed object
func (r *RssCaps) FeedXML() interface{} {
return r
}

Voir le fichier

@ -29,10 +29,11 @@ var htmlFlags = 0 |
md.HTML_HREF_TARGET_BLANK
func init() {
HtmlMdRenderer = md.HtmlRenderer(htmlFlags, "", "")
HTMLMdRenderer = md.HtmlRenderer(htmlFlags, "", "")
}
var HtmlMdRenderer md.Renderer
// HTMLMdRenderer render for markdown to html
var HTMLMdRenderer md.Renderer
// MarkdownToHTML : convert markdown to html
// TODO: restrict certain types of markdown
@ -41,7 +42,7 @@ func MarkdownToHTML(markdown string) template.HTML {
markdown = ">" + markdown[4:]
}
markdown = strings.Replace(markdown, "\n&gt;", "\n>", -1)
unsafe := md.MarkdownOptions([]byte(markdown), HtmlMdRenderer, md.Options{Extensions: mdOptions})
unsafe := md.MarkdownOptions([]byte(markdown), HTMLMdRenderer, md.Options{Extensions: mdOptions})
html := bluemonday.UGCPolicy().SanitizeBytes(unsafe)
return template.HTML(html)
}

Voir le fichier

@ -2,6 +2,7 @@ package structs
import "github.com/NyaaPantsu/nyaa/models"
// TorrentCache torrent cache struct
type TorrentCache struct {
Torrents []models.Torrent
Count int

Voir le fichier

@ -17,19 +17,34 @@ import (
)
const (
ShowAll Status = 0
FilterRemakes = 2
Trusted = 3
APlus = 4
// ShowAll by default show all torrents
ShowAll Status = 0
// FilterRemakes filter torrent remakes
FilterRemakes = 2
// Trusted trusted torrents
Trusted = 3
// APlus torrents not used anymore
APlus = 4
)
// Status torrent status
type Status uint8
// SortMode selected sort mode
type SortMode uint8
// Category torrent categories
type Category struct {
Main, Sub uint8
}
// SizeBytes size in bytes
type SizeBytes uint64
// DateFilter date to filter for
type DateFilter string
// Categories multiple torrent categories
type Categories []*Category
// TorrentParam defines all parameters that can be provided when searching for a torrent

Voir le fichier

@ -13,6 +13,7 @@ var intEvents struct {
funcs []func()
}
// OnInterrupt handles signal interupts
func OnInterrupt(fn func()) {
intEvents.lock.Lock()
intEvents.funcs = append(intEvents.funcs, fn)

Voir le fichier

@ -8,6 +8,7 @@ import (
"syscall"
)
// Handle handles unix interupts
func Handle() {
chnl := make(chan os.Signal)
signal.Notify(chnl, syscall.SIGHUP, os.Interrupt)

Voir le fichier

@ -139,6 +139,7 @@ func IsUTFLetterNumericValidator(fl validator.FieldLevel) bool {
return IsUTFLetterNumeric(value)
}
// DefaultValidator default validator
func DefaultValidator(fl validator.FieldLevel) bool {
switch fl.Field().Kind() {
case reflect.String: