softwarerero / meteor-accounts-t9n Goto Github PK
View Code? Open in Web Editor NEWTranslations for meteor account's error messages
License: MIT License
Translations for meteor account's error messages
License: MIT License
While completing my packages, I've noticed there are a few keys which are still missing.
and then something more parametric for validation errors like:
...I know the parametric version is not straightforward to implement :-(
Thoughts? Ideas?
This is a correct translation, master is really bad one
`es =
error:
accounts:
# acccounts-base
"You've been logged out by the server Please login again": "Has sido desconectado por el servidor. Por favor ingresa otra vez."
"Your session has expired. Please login again.": "Tu session ha expirado. Por favor ingresa otra vez."
"User validation failed": "No se ha podido validar el usuario"
"Email already exists": "Email ya existe"
"Username already exists": "Usuario ya existe"
"Email doesn't match the criteria.": "Email no coincide con los criterios"
# acccounts-password
"User not found": "Usuario no encontrado"
"User has no password set": "Usuario no tiene contraseña"
"Incorrect password": "Contraseña no válida"
"Must be logged in": "Hay que ingresar"
"Invalid verifier": "Verificador no inválido"
"Token expired": "Token expirado"
"Token has invalid email address": "Token contiene un Email inválido"
"Verify email link expired": "Enlace para verificar el Email ha expirado"
"Verify email link is for unknown address": "Enlace para verificar el Email contiene una dirección desconocida"
"Need to set a username or email": "Tienes que especificar un usuario o un email"
"Signups forbidden": "Registro prohibido"
T9n.map "es", es`
Hi there!
...I guess your last meteor publish
had some problems.
With meteor show softwarerero:accounts-t9n
I'm getting:
Package softwarerero:accounts-t9n:
Version 0.0.17 Translations for the meteor account's error messages.
Version 0.0.18 Translations for the meteor account's error messages.
Version 0.0.19 Translations for the meteor account's error messages.
Version 0.0.20 Translations for the meteor account's error messages.
Version 1.0.0 Translations for the meteor account's error messages.
Version 1.0.1 Translations for the meteor account's error messages.
Version 1.0.2 Translations for the meteor account's error messages.
Version 1.0.3 Translations for the meteor account's error messages.
Maintained by: softwarerero.
Git repository at: https://github.com/softwarerero/meteor-accounts-t9n.git
Hi there,
I am trying to use t9n with my project. It is developed base on meteor 1.3 beta.8, and I am having trouble make t9n work in it. T9n.setLanguage is placed in the lop-level outside Meteor.startup like this
T9n.setLanguage("zh_cn");
Meteor.startup(function () {
...
})
Project can run with no problem, however, the error messages from accounts-password package are not translated. For example, when I try to register using an existed email, I still got this message "Email already exists."
I'm wondering if meteor-accounts-t9n works with Meteor 1.3? If so, what might be the reason that caused it not working in my project?
Thanks.
Some strings still are untranslated, some examples are:
'Please verify your email first. Check the email and follow the link!'
'Successful Registration! Please check your email and follow the instructions.'
While I was implementing an informal "Du" version for the German language texts, I saw that two of the existing "Sie" texts are incorrect:
"You've been logged out by the server. Please log in again.": "Der Server hat Dich ausgeloggt. Bitte melde Dich erneut an."
This is already using "Du" instead of "Sie", which is inconsistent to the rest of the texts.
"A new email has been sent to you. If the email doesn't show up in your inbox, be sure to check your spam folder." : "Eine neue Email wurde an Sie verschickt. Sollte sich die Email nicht in Ihrem Posteingang befinden, prüfen Sie bitten Ihren Spamordner."
It has to be "bitte" instead of "bitten" at the end of the last sentence.
I would also prefer the term "abmelden" / "abgemeldet" instead of "ausloggen" / "ausgeloggt". In German, this is considered as "Denglisch", i.e. a mix of German and English.
At the moment, the German language texts are using the formal "Sie" to address the user. For my application, the informal "Du" would be much better. I could provide the informal version, but I don't know if there is a way to include it in the standard of accounts-t9n?
Any suggestions for my translation from fellow Arab meteorites are welcome here ;)
Is this a bug or a feature?
I think this
if Object.keys(args).length == 0 then ret else @replaceParams label, args
should be this
if Object.keys(args).length == 0 then ret else @replaceParams ret, args
I am not used to coffee script but french translation fails when using namespace (e.g. 'error.account.Login forbidden'). It looks like to be a typo with indentation.
Isn't it ?
For some reason, when I try to clone this repository in Windows 7, I get the following output (Using Git Bash):
MisutoWolf@UDYR ~/projects
$ git clone https://github.com/softwarerero/meteor-accounts-t9n.git
Cloning into 'meteor-accounts-t9n'...
remote: Counting objects: 468, done.
rRemote: Total 468 (delta 0), reused 0 (delta 0)eceiving objects: 78% (366/468)
Receiving objects: 83% (389/468)
Receiving objects: 100% (468/468), 117.86 KiB | 0 bytes/s, done.
Resolving deltas: 100% (291/291), done.
Checking connectivity... done.
error: unable to create file t9n/errors_list.md: (Invalid argument)
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'
Not sure what the deal is, will continue to research.
how to integrate with "ian:accounts-ui-bootstrap-3"?
I know there's zh_tw and would like to help add zh_hk.
There are quite some different word usages between the two regions.
I checked zh_tw, there are missing translations for phrases like "Verification email lost?", "Send again" etc...
Is there a standard way to get the most recent and complete code list to be translated?
Any guides to start with?
Thanks.
Dear all,
this package is getting better and better and, undoubtedly, it is a very precious resource for anyone interested in writing Meteor application dealing with user authentication.
Thank to @eahefnawy, @mdede, @robhunt3r, @softwarerero, @djhi, @pwldp, @alanmeira, @timtch, @alesvaupotic, @timbrandin, @olragon, @musgravejw, @gaborpop, @bshardi, @dkoo761 and possibly others (I hope I'm not leaving anyone out..) it now comprises 13 languages.
I think this is a huge achievement! Thank you everyone for the great work!
During the last few months, I and @softwarerero have been working to make it even more complete. Some translations have been ported here from the contributions made to accounts-entry, while a bunch of new keys and error messages were added to support latest Meteor releases.
Now, we'd like you could provide your precious contributions once again to complete all missing translations! I know it's a quite pretending request, but I hope we'll find you in line with the aim of this issue. Please, don't feel bound to it and contribute only if you can and wish to.
If you look inside the files under the t9n
folder, you'll see some line starting with a comment like this #>
which means the translation for that key is missing.
For example you can have a look at https://github.com/softwarerero/meteor-accounts-t9n/blob/master/t9n/ar.coffee#L6 and https://github.com/softwarerero/meteor-accounts-t9n/blob/master/t9n/ar.coffee#L70. The first one reports the text to be translated to the right of the key, while the second one does not: this is because the text to be translated is the key itself.
Please try to keep dots, commas, semi columns and other punctuation symbols in the same positions.
...and don't forget to add your name to the list of translators! See for example https://github.com/softwarerero/meteor-accounts-t9n/blob/master/t9n/ar.coffee#L2
To prevent having many people working on the same file at the same time I suggest you open a new issue for each language file you start to complete. The title could be something like 'Completing Italian Translation'. This should permit to avoid duplicating efforts, preventing conflicts during file merg and also allow discussions about how keys and messages should be better translated.
Finally, I'd like to thank @softwarerero for maintaining such an awesome package!
Lets finish it all together!
Regards,
Luca
Update: Although I haven't written it explicitly, contributions are more than welcome by anyone willing to participate on this. New languages can also be added.
Update 2: Please let the lines starting with #
only unchanged :-)
Improvements previously suggested by @waeltken sould be considered.
See: https://github.com/waeltken/accounts-templates-core/commit/60da67401a14e6087c05297af016463f59d3c393
The package was automatically migrated to the new packaging system.
Since the username softwarerero was not registered (my guess) under meteor.com, it now appears as mrt:accounts-t9n
(see https://hackpad.com/Migrating-Packages-zN0we9sIjkH)
Then I guess we should also claim your package ownership:
https://hackpad.com/Migrating-Packages-zN0we9sIjkH#:h=Claiming-your-package
I think meteor-accounts-t9n
must split on multiple meteor package like do rzymek:meteor-moment
Then add only needed language per project not all translation files.
Like Ex:
meteor add softwarerero:accounts-t9n-es
for Spanish translation.
This is a must have.
Getting this error after updating to latest version:
=> Errors prevented startup:
While building package `accounts-t9n`:
<runJavaScript-33>:148:11: t9n/pl.coffee:92: unexpected : (compiling t9n/pl.coffee) (at handler)
It's actually missing 2 extra spaces on line 89:
"Password is old. Please reset your password.": "Hasło jest stare. Proszę wyzerować hasło."
In case of missing translation-keys and inappropriate or unsuitable translations, it should be possible to manually override translations.
Unfortunately, I don't use coffeescript so I can't create a pull-request.
The latest release looks like it has changed the _maps call to not work from a refactoring.
anticoders/meteor-i18n@aaaab6a
This is causing people who update to break, which is in turn breaking accounts-entry because we don't peg the version to a certain number.
I don't understand Translations are currently available for...
on docs?
It mean that this package can translation by itself or still config file.
T9n.map('en', {
"sayHello": 'Hi @{name}'
});
/**
* Kh
*/
T9n.map('kh', {
"sayHello": 'សួស្តី @{name}'
});
See this issue, and please remove the dependency you have on Blaze.
studiointeract/accounts-ui#15
I use T9n
and lang
.
I set label of simple-schema
by T9n.get(code)
, but the label don't change when switch to other lang
T9n.map('en', {
"sayHello": 'Hi @{name}'
});
/**
* Kh
*/
T9n.map('kh', {
"sayHello": 'សួស្តី @{name}'
});
...
module: {
type: String,
label: T9n.get("sayHello", true, {name: "Theara"})
},
HI! On your docs page it says Portuguese (Brazilian) is available, but there is no pt_BR when we do:
T9n.getLanguages()
on Browser console it shows:
["ar", "ca", "cs", "da", "de", "el", "en", "es", "es_ES", "fa", "fr", "he", "hr", "hu", "id", "it", "ja", "kh", "nl", "no_NB", "pl", "pt", "pt_PT", "ro", "ru", "sl", "sv", "tr", "uk", "vi", "zh_cn", "zh_tw"]
Maybe the "pt" translation itself is good for Brazilian Portuguese already. But for the sake of using the same conventions we get from browser, it would be nice either to change "pt" to "pt-BR" or add a new one.
In fact, I wonder if the other languages like pt_PT, zh_cn and zh_tw would not benefit with the change to pt-PT, zh-cn and zh-tw respectively.
If needed, I could help with the pt_BR translation / check for the project.
What do you think?
Is calling T9n.setLanguage("de");
somewhere in client code all that is necessary?
When I put T9n.getLanguages() in my console.. it says that the zh-tw is zh_tw... different than the doc.
What's the problem?
T9n.getLanguages()
["ar", "cs", "da", "de", "el", "en", "es", "es_ES", "fa", "fr", "he", "it", "nl", "no_NB", "pl", "pt", "ru", "sl", "sv", "uk", "vi", "zh-cn", "zh_tw"]
Sincerely,
txs
UI.registerTemplate is changed to Tracker.registerTemplate
The 'handlebars' package is deprecated and templating should be used instead.
I'm using a package which depends on this package, and another package which depends on https://github.com/anticoders/meteor-i18n. Since both are loaded at once, conflicts arise over the global variable i18n
.
In this case, we could either:
AccountsT9n
if it's specialised.Hello, the docs need more information about how we can start to use your package. I tried put the "T9n.setLanguage("es")" in a JS client also in server and dont works.
Hi @softwarerero,
I'm not able to add version 0.0.15 to my projects, can you please confirm it is actually released?
Cheers
Standard language code format may be ko-KR.
But in meteor-accounts-t9n, using es_ES or zh_cn like format.
This is not an issue. The issue is that I want to add Korean language.
Because of not being ko_KR... I can not use Korean in useraccounts package.
Could you add korean? if I send you a translated file?
Do you need ko_KR.less file?
It's not possible to translate the "Verification email lost? Send again" on the login page and the whole "Send verification email again" page yet?
I'm using just-i18n in another package, and my package doesn't work when an app is also using accounts-t9n. Here's the issue. Looks like the problem is the i18n helper - accounts-t9n defines the i18n helper, overwriting just-i18n's helper, but it doesn't use the mappings defined with i18n.map. Since your i18n is deprecated anyway, would you consider just removing it? Or fixing it so it is actually compatible with just-i18n, maybe by also overwriting i18n.map?
Thanks!
The latest versions haven't been published to the meteor package server.
$ meteor show mrt:accounts-t9n
Refreshing package metadata. This may take a moment.
Version 0.0.1 : Translations for the meteor account's error messages
Version 0.0.2 : Translations for the meteor account's error messages
Version 0.0.3 : Translations for the meteor account's error messages
Version 0.0.4 : Translations for the meteor account's error messages
Version 0.0.7 : Translations for the meteor account's error messages
Version 0.0.10 : Translations for the meteor account's error messages
Version 0.0.11 : Translations for the meteor account's error messages
Version 0.0.12 : Translations for the meteor account's error messages
Version 0.0.13 : Translations for the meteor account's error messages
Maintained by tmeasday at https://github.com/softwarerero/meteor-accounts-t9n.git.
You can find more information at https://github.com/softwarerero/meteor-accounts-t9n
Information about publishing to the new meteor package system can be found here, it looks pretty straightforward.
http://atmospherejs.com/docs/publishing
Create a function T9n.getLanguages() that returns a map of language codes and translations:
[
{name: "English", code: "en"},
{name: "Italiano", code: "it"},
{name: "Español", code: "es"},
]
It looks like this line:
https://github.com/softwarerero/meteor-accounts-t9n/blob/master/t9n.coffee#L26
Breaks any app using accounts-t9n in IE8. I am not a big fan of IE, but our clients need us to support that browser.
I have a bug in my application that originates in version 1.1.4 of this package.
When I tried to specify that my app should use 1.1.6 I got a conflict error:
* softwarerero:[email protected] <- my-app:external-dependencies
* softwarerero:[email protected] <- useraccounts:core 1.12.4 <- useraccounts:materialize 1.12.4 <- my-app:external-dependencies 0.0.2
So I checked useraccounts:core
. I found that they know this causes a bug, but they haven't upgraded because 1.1.6 has not been released.
Please release the fix!
I've just dig a little inside the package accounts-ui
and noticed there are some other messages it could be useful to include:
While I've already added myself "Email sent!" among the normal texts, I'm starting to think it might be better to have three different groups (when not more) of keys:
to be accessed with a modified get
method accepting another parameter to be possibly used to specify the group to which the key belongs to:
@get: (label, category = 'text', markIfMissing = true) ->
@dep.depend()
@depLanguage.depend()
if typeof label != 'string'
return ''
label = category + '.' + label
@maps[@language]?[label] ||
@maps[@defaultLanguage]?[label] ||
if markIfMissing then @missingPrefix + label + @missingPostfix else label
This would allow for, e.g.:
<label for="someInput"> {{t9n 'signin'}}
or:
var errorText = t9n.get(someVariable, category='error');
Thoughts about this?
I've just updated the es_ES on my local project, so just in case someone can update this, here's the updated object
es_ES =
add: 'agregar'
and: 'y'
back: 'atrás'
changePassword: 'Cambiar Contraseña'
choosePassword: 'Elegir Contraseña'
clickAgree: 'Si haces clic en Crear Cuenta estás de acuerdo con la'
configure: 'Configurar'
createAccount: 'Crear cuenta'
currentPassword: 'Contraseña actual'
dontHaveAnAccount: '¿No estás registrado?'
email: 'Email'
emailAddress: 'Dirección de email'
emailResetLink: 'Restaurar email'
forgotPassword: '¿Has olvidado tu contraseña?'
ifYouAlreadyHaveAnAccount: '¿Ya tienes una cuenta? '
newPassword: 'Nueva Contraseña'
newPasswordAgain: 'Nueva Contraseña (repetición)'
optional: 'Opcional'
OR: 'O'
password: 'Contraseña'
passwordAgain: 'Contraseña (repetición)'
privacyPolicy: 'Política de Privacidad'
remove: 'Eliminar'
resetYourPassword: 'Recuperar tu contraseña'
setPassword: 'Establecer Contraseña'
sign: 'Entrar'
signIn: 'Entrar'
signin: 'entra'
signOut: 'Salir'
signUp: 'Regístrate'
signupCode: 'Código para registrarte'
signUpWithYourEmailAddress: 'Regístrate con tu email'
terms: 'Términos de Uso'
updateYourPassword: 'Actualizar tu contraseña'
username: 'Usuario'
usernameOrEmail: 'Usuario o email'
'with': 'con'
info:
emailSent: 'Email enviado'
emailVerified: 'Email verificado'
passwordChanged: 'Contraseña cambiada'
passwordReset: 'Resetear Contraseña'
error:
emailRequired: 'El email es necesario.'
minChar: '7 carácteres mínimo.'
pwdsDontMatch: 'Las contraseñas no coninciden'
pwOneDigit: 'mínimo un dígito.'
pwOneLetter: 'mínimo una letra.'
signInRequired: 'Primero debes iniciar sesión.'
signupCodeIncorrect: 'Código de registro inválido.'
signupCodeRequired: 'Se requiere un código de registro.'
usernameIsEmail: 'El usuario no puede ser una dirección de correo.'
usernameRequired: 'Se requiere nombre de usuario.'
accounts:
'Email already exists.': 'El correo ya existe.'
'Email doesn\'t match the criteria.': 'El correo no es válido.'
'Invalid login token': 'Token de inicio de sesión inválido'
'Login forbidden': 'Inicio de sesión fallido'
'Service unknown': 'Método de autenticación desconocido'
'Unrecognized options for login request': 'Opciones desconocidas para iniciar sesión'
'User validation failed': 'No hemos podido verificar el usuario'
'Username already exists.': 'Este usuario ya existe.'
'You are not logged in.': 'No estás autenticado'
'You've been logged out by the server. Please log in again.': 'Has sido desconectado por el servidor. Por favor inicia sesión de nuevo.'
'Your session has expired. Please log in again.': 'Tu session ha expirado. Por favor inicia sesión de nuevo.'
'No matching login attempt found': 'No se ha encontrado inicio de sesión coincidente'
'Password is old. Please reset your password.': 'Tu contraseña es antigua, por favor cámbiala pronto'
'Incorrect password': 'Contraseña inválida'
'Invalid email': 'Email inválido'
'Must be logged in': 'Debes iniciar sesión'
'Need to set a username or email': 'Debes especificar un usuario o email'
'old password format': 'estilo antiguo de contraseña'
'Password may not be empty': 'La contraseña no puede estar en blanco'
'Signups forbidden': 'Los registros no están permitidos en este momento'
'Token expired': 'El token ha expirado'
'Token has invalid email address': 'EL token contiene un email inválido'
'User has no password set': 'El usuario no tiene contraseña'
'User not found': 'Usuario no encontrado'
'Verify email link expired': 'El enlace para verificar el email ha caducado'
'Verify email link is for unknown address': 'El enlace para verificar el email está asociado a una dirección desconocida'
'Match failed': 'Comprobación fallida'
'Unknown error': 'Error desconocido'
T9n.map 'es_ES', es_ES
Hey @softwarerero thanks for you handy package. Appreciate it!
I think it would be a great idea falling back from xx_YY
to xx
.
Example: we today have pt
and pt_PT
but not pt_BR
. So it would be nice if after a T9n.setLanguage('pt_BR')
and not finding it, you would fallback to pt
.
What do you think? Thanks
How would I use this to translate accounts-password Meteor.Error messages into some other language than English?
Hello,
I'm I using https://github.com/TAPevents/tap-i18n to internationalize my meteor application and I would like third parties packages to integrate with the existing system as much as possible. Would it be possible to use this package to handle the translation logic? With that for instance, we won't have to add all translations to the meteor bundle — and could instead request each translation file on demand.
Or maybe this architectural change is too big and I should start an alternative package to implement it?
https://github.com/comerc/lang
Do you want to improve features with this functionality?
request add params direct on {{t9n code}}
like:
{{t9n code name="Theara" param2="..."}}
Hey there,
I'm trying to not send all languages to the client like this
env T9N_LANGUAGES="de,en" meteor
shell is fish not bash, hence the env
in front. this gives me
> process.env.T9N_LANGUAGES
'de,en'
and also the code from you package.js works just fine
> if(process.env.T9N_LANGUAGES) {
LANGUAGES = process.env.T9N_LANGUAGES.split(',');
}
> LANGUAGES
[ 'de', 'en' ]
still in the browser console I am able see all languages in T9n.maps
.
What am I doing wrong?
Hey guys,
Is there any way to set the T9N_LANGUAGES env. in settings.json?
I've tried the following in my "settings.dev.json":
{
"T9N_LANGUAGES": "da"
}
................................................
{
"public": {
"T9N_LANGUAGES": "da"
}
}
...............................................
{
"env": {
"T9N_LANGUAGES": "da"
}
}
................................................
But all languages is still loaded.
Kind regards
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.