mirror of
https://github.com/wassname/talk.git
synced 2026-07-23 13:10:20 +08:00
Fix language files
This commit is contained in:
@@ -5,15 +5,16 @@ import merge from 'lodash/merge';
|
||||
|
||||
import esTA from '../../../node_modules/timeago.js/locales/es';
|
||||
import frTA from '../../../node_modules/timeago.js/locales/fr';
|
||||
import pt_BRTA from '../../../node_modules/timeago.js/locales/pt_BR';
|
||||
import en from '../../../locales/en.yml';
|
||||
import es from '../../../locales/es.yml';
|
||||
import fr from '../../../locales/fr.yml';
|
||||
import pr from '../../../locales/pr.yml';
|
||||
import pt_BR from '../../../locales/pt_BR.yml';
|
||||
|
||||
// Translations are happening at https://translate.lingohub.com/the-coral-project/dashboard
|
||||
|
||||
const defaultLanguage = 'en';
|
||||
const translations = {...en, ...es, ...fr, ...pr};
|
||||
const translations = {...en, ...es, ...fr, ...pt_BR};
|
||||
|
||||
let lang;
|
||||
let timeagoInstance;
|
||||
@@ -44,6 +45,7 @@ function init() {
|
||||
|
||||
ta.register('es', esTA);
|
||||
ta.register('fr', frTA);
|
||||
ta.register('pt_BR', pt_BRTA);
|
||||
timeagoInstance = ta();
|
||||
}
|
||||
|
||||
|
||||
@@ -18,15 +18,15 @@ en:
|
||||
comment:
|
||||
anon: "Anônimo"
|
||||
ban_user: "Proibir o usuário"
|
||||
comment: "Publique um comentário"
|
||||
comment: "Publicar um comentário"
|
||||
edited: Editado
|
||||
flagged: "marcado"
|
||||
view_context: "Veja o contexto"
|
||||
comment_box:
|
||||
post: "Publique"
|
||||
post: "Publicar"
|
||||
cancel: "Cancelar"
|
||||
reply: "Responda"
|
||||
comment: "Publique um comentário"
|
||||
comment: "Publicar um comentário"
|
||||
name: "Nome"
|
||||
comment_post_notif: "Seu comentário foi postado."
|
||||
comment_post_notif_premod: "Obrigado por publicar seu comentário. Nossa equipe de moderação analisará seu comentário em breve."
|
||||
+3
-3
@@ -6,16 +6,16 @@ const yaml = require('yamljs');
|
||||
const es = yaml.load('./locales/es.yml');
|
||||
const en = yaml.load('./locales/en.yml');
|
||||
const fr = yaml.load('./locales/fr.yml');
|
||||
const pr = yaml.load('./locales/pr.yml');
|
||||
const pt_BR = yaml.load('./locales/pt_BR.yml');
|
||||
|
||||
const accepts = require('accepts');
|
||||
|
||||
// default language
|
||||
let defaultLanguage = 'en';
|
||||
let language = defaultLanguage;
|
||||
const languages = ['en', 'es', 'fr', 'pr'];
|
||||
const languages = ['en', 'es', 'fr', 'pt_BR'];
|
||||
|
||||
const translations = Object.assign(en, es, fr, pr);
|
||||
const translations = Object.assign(en, es, fr, pt_BR);
|
||||
|
||||
/**
|
||||
* Exposes a service object to allow translations.
|
||||
|
||||
Reference in New Issue
Block a user