Giter Site home page Giter Site logo

meteor-accounts-t9n's Introduction

Translations for the meteor standard packages (almost i18n)

This package offers translations for accounts-base, accounts-passwords, accounts-entry, accounts-templates-core and billing. Contributions for other packages are welcome. We try to translate only messages that might pop up at a users screen as developers are expected to understand English errors anyway.

Translations are currently available for Arabic, Catalan, Chinese (Mandarin), Chinese (Traditional), Chinese (Hong Kong), Croatian, Czech, Danish, Dutch, Estoninan, Farsi, Finish, French, French (Canada), German, Greek, Hebrew, Hungarian, Indonesian, Italian, Japanese, Khmer, Korean, Norwegian, Polish, Portuguese (Brasil), Portugues (Portugal), Romanian, Russian, Slovak, Slovenian, Spanish (South America), Spanish (Spain), Swedish, Thai, Turkish, Ukrainian and Vietnamese.

Version 2.4.0

Add variable replacement which allows variants for a language key, for example for handling singular and plural, see #193.

Version 2.3.0

meteor-accounts-t9n now only works as an npm package, it is not possible to add it as meteor package any longer. Also the dependencies on CoffeeScript and Tracker do not exist any more, so there integration is optional and you have to do it manually, see https://github.com/softwarerero/meteor-accounts-t9n-example for some inspiration.

Installation and initialisation

meteor npm install --save meteor-accounts-t9n

Require (or import) T9n (this was a global variable in former versions)

T9n = (require 'meteor-accounts-t9n').T9n

Add English default translations (to this for any language you want)

T9n.map 'en', require 'meteor-accounts-t9n/build/en' T9n.map 'en', # add another t9n to the English dictionary 'another cool t9n', 'another cool translation'

Register Tracker (optional and client only)

T9n.setTracker require 'meteor/tracker'

Register t9n template helper (client only, this was done automatically before)

Template.registerHelper 't9n', (x, params) -> T9n.get(x, true, params.hash)

API

Set a current language for translations:

T9n.setLanguage("es")

Get a translation in Javascript:

T9n.get(code)

Examples:

  • T9n.get('name');
  • T9n.get('store.purchase');
  • T9n.get('error.accounts.User not found');

Get a localized text in a template

{{t9n code}} {{t9n code parameter1='value'}}

Example: {{t9n "store.purchase"}}.

If a translation is not found the key is displayed. To spot not translated keys a prefix and a postfix can surround the key, they default to ">" and "<" so a you would see ">nonExistantKey<". You can change the pre- and postfix:

T9n.missingPrefix = ">" T9n.missingPostfix = "<"

If you use get you can also suppress printing of the prefix and postfix if you set the second parameter to false (it defaults to true). T9n.get code, false

Get a localized text with parameters

Optionally named parameters can be used, naming them allows for repetition.

T9n.get code, true, args

Example:

If you define a string in your language file like

'pun': '@{subject} @{predicate} @{adverb} @{object}. Frische @{object} @{predicate} @{subject}.'

and have an object like

args =
  subject: "Fischer's Fritz"
  predicate: 'fischt'
  object: 'Fische'
  adverb: 'frische'

you could call

T9n.get 'pun', true, args

and that should give you

'Fischer's Fritz fischt frische Fische. Frische Fische fischt Fischer's Fritz.'

You must specify the second argument for prefix/postfix too, I am sorry.

Define translations

T9n.map language, yourMap

Example:

T9n.map 'en',
  hello: 'world'
  store:
    purchase: 'buy now'
    basket: 'basket'

Tip: If you do not want to expose the reason why a login was unsuccessful for security reasons. They could overwrite the corresponding messages:

T9n.map 'en',
  error:
    accounts:
      'User not found': 'Not for you'
      'Incorrect password': 'Not for you'

Language variants (v1.2)

T9n.language = 'en'
equals T9n.get('error.accounts.Incorrect password'), 'Incorrect password'

T9n.map 'en_GB', 'error.accounts.Incorrect password': 'You might want to enter a more correct version of your password'
T9n.language = 'en_GB'
equals T9n.get('error.accounts.Incorrect password'), 'You might want to enter a more correct version of your password'

Starting from (v.1.2.2) you can also do setLanguage('en-GB') and it gets converted internally to 'en_GB'. This is usefull for taking the language string directly from an http header.

#Language codes and contributions

Code Language Contributor(s)
ar Arabic eahefnawy
ca Catalan ixdi
cs Czech mdede
da Danish LarsBuur
de German softwarerero, robhunt3r, sclausen, sarasate
el Greek mutil
es Spanish softwarerero, robhunt3r, PolGuixe, mortaldraw
es_formal Formal spanish softwarerero, robhunt3r, PolGuixe, mortaldraw
es_ES / es-ES Spanish for Spain maomorales, PolGuixe, mortaldraw
es_ES_formal / es-ES Formal spanish for Spain maomorales, PolGuixe, mortaldraw
et Estonian krishaamer
fa Farsi pajooh
fi Finnish xet7
fr French djhi
fr_CA French (Canada) huguesbrunelle
he Hebrew noamyoungerm
hr Croatian tnedich
hu Hungarian balazskiss
id Indonesian hellstad
it Italian splendido
ja Japanese y-ich, exKAZUu
kh Khmer yuomtheara
ko Korean candicom, buo
nl Dutch willemx, louwers
no_NB / no-NB Norwegian bokmål kjetilge
pl Polish pwldp, wareczek, spiotr12
pt Portuguese (Brasil) alanmeira, Tadeu Caldararo
pt_PT / pt-PT Portuguese (Portugal) tdbs
ro Romanian alexhuszar
ru Russian timtch
sk Slovak MartinBucko, aladinko
sl Slovenian alesvaupotic
sv Swedish timbrandin
th Thai Prawee
tr Turkish serkandurusoy
uk Ukrainian SkeLLLa
vi Vietnamese olragon
zh_cn / zh-CN Simplified Chinese laosb
zh_hk / zh-HK Hong Kong Chinese daveeel
zh_tw / zh-TW Taiwan Chinese victorleungtw

Note: "xx" or "xx-XX" is the IETF language tag standard format.

Send only some language files to the client (new in version 1.1.0)

If you have a need to reduce bandwidth you can specify which languages to send to the client by setting an environment variable like T9N_LANGUAGES='es,de'. Now only Spanish and German should go over the wire instead of all translations. With the current package manager this does not work anymore. If you need that functionality delete ~/.meteor/packages/softwarerero_accounts-t9n and instead copy it directly into your project (you can go to myproject/packages and issue git clone https://github.com/softwarerero/meteor-accounts-t9n.git). Now it should work again.

History

This package is inspired by subhog's just-i18n and included this as a dependency before version 0.0.3. Sadly the all project versions before 0.0.17 where deleted from Atmosphere when they updated to the new Meteor package format.

License

MIT

meteor-accounts-t9n's People

Contributors

axolodev avatar buo avatar daveeel avatar djhi avatar exkazuu avatar juliomac avatar kevincharm avatar kjetilge avatar laosb avatar llvasconcellos avatar maomorales avatar mdede avatar mutil avatar noamyoungerm avatar olragon avatar polguixe avatar prawee avatar pwldp avatar ryw avatar sclausen avatar serkandurusoy avatar skellla avatar softwarerero avatar splendido avatar tdbs avatar timbrandin avatar tnedich avatar vuhrmeister avatar willemx avatar y-ich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

meteor-accounts-t9n's Issues

1.1.6 Not released on Atmosphere

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!

Latest version not published

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

Problem with FR translation

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 ?

Unable to clone in Windows 7?

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.

process.env.T9N_LANGUAGES not working

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?

new translated spanish (es_ES) strings

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

Feature request: Informal version of the German language texts

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?

i18n helper breaks other packages using just-i18n

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!

problem with T9n.get(code) no change when switch lang?

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"})
    },

Could you add Korean? ko_KR.

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?

Completion of Translations

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 :-)

Incorrect German language texts

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.

Does t9n work well with meteor 1.3?

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.

Bad spanish translation

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`

new keys proposal and definition of groups of keys

I've just dig a little inside the package accounts-ui and noticed there are some other messages it could be useful to include:

  • "Password (again)" (label)
  • "Password changed" (info)
  • "Passwords don't match" (error)
  • "Change password" (btn text)
  • "New Password" (label)
  • "Set Password" (btn text)
  • "Choose a password" (label)
  • "Email verified" (info)
  • "Password Reset" (info)

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:

  • error (hence getting rid of the accounts sub key)
  • info
  • text

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?

Confuse doc

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.

pt_BR missing

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?

Using tap-i18n

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?

zh-tw and zh_tw

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

Set T9N_LANGUAGES in settings.json

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

Untranslated Strings

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.'

Would like to add zh_hk

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.

(yet another) new keys proposal

While completing my packages, I've noticed there are a few keys which are still missing.

  • something to signal a required field, e.g., "Required field"
  • a title for the page for email verification, e.g., "Verify your email"

and then something more parametric for validation errors like:

  • "X character(s) minimum password."
  • "Password requires X letter(s)."
  • "Minimum required length: X"
  • "Maximum Allowed length: X"
  • "At least X digit/lowercase/uppercase"

...I know the parametric version is not straightforward to implement :-(

Thoughts? Ideas?

Fall back xx_YY to xx if YY not present?

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

Beginner Question

How would I use this to translate accounts-password Meteor.Error messages into some other language than English?

v1.0.4 not yet published

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

Conflicts with other i18n packages

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:

  • Outline a common API and implement it differently for each "provider" package. This seems a bit infeasible if they don't have the same set of functionality. A similar problems exists for loggers in Java, where slf4j provides a common API and log4j, logback, etc. support it. Libraries only include this API instead of a concrete implementation, which is left in the hands of the app developer.
  • Use a unique name for each package. In this case, perhaps AccountsT9n if it's specialised.

Coffee syntax error in t9n/pl.coffee

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."

Parameter replacement does not work.

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

Make translations overrideable

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.