Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Untranslated Strings #105

Closed
tdbs opened this issue Jun 21, 2015 · 41 comments
Closed

Untranslated Strings #105

tdbs opened this issue Jun 21, 2015 · 41 comments

Comments

@tdbs
Copy link
Contributor

tdbs commented Jun 21, 2015

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

@tdbs
Copy link
Contributor Author

tdbs commented Jun 23, 2015

Cloud you explain why you are closing this?

@softwarerero
Copy link
Owner

I have no idea what you are talking about, you did not even specify a file.

@tdbs
Copy link
Contributor Author

tdbs commented Jun 24, 2015

You could just ask.

The reason i didn't specify a file it's because it's a problem with all of them.
These messages are not being translated into any language.

Steps to reproduce: Register an account and you will see: 'Successful Registration! Please check your email and follow the instructions.' (probably need to have verify email turned on). And then try loggin in without verifying the account to see: 'Please verify your email first. Check the email and follow the link!'.

@softwarerero
Copy link
Owner

I see. I guess these strings have been introduced after the project was started in February 2014. Sorry for closing this to quick.

@juliomac
Copy link
Contributor

Allow me to add those to this list of untranslated Strings. I can't seem to find them in any file. I can only confirm they are not being translated at least for Portuguese and Spanish.

captura de tela 2015-07-12 17 12 37

I could solve two of them with the following mapping. Phone is not shown in the picture, but it appears on placeholder when we add "tel" input type.

However I can't seem to get the "Minimum required length" to work. I tried with and without ":".

T9n.map('pt', {
Phone: 'Telefone',
'Invalid email': 'Email inválido',
'Minimum required length': 'Tamanho mínimo'
});

@MartinBucko
Copy link
Contributor

+1 same here.. please reopen issue

I try to remap text fields to my language translation file:

AccountsTemplates.configure
    texts:
        button:
            resendVerificationEmail: "resendVerificationEmail"
        errors:
            captchaVerification: "error.captchaVerification"
            validationErrors: "validationErrors"
            verifyEmailFirst: "info.verificationEmailSent"
        info:
            pwdSet: "info.pwdSet"
            signUpVerifyEmail: 'info.signUpVerifyEmail'
            verificationEmailSent: 'info.verificationEmailSent'
        title:
            resendVerificationEmail: "resendVerificationEmailTitle"
            verifyEmail: "verifyEmail"

        maxAllowedLength: "maxAllowedLength"
        minRequiredLength: "minRequiredLength"
        requiredField: "requiredField"
        resendVerificationEmailLink_link: "resendVerificationEmailLink"
        resendVerificationEmailLink_pre: "resendVerificationEmailLinkPre"

With most mapped strings i was successful but some not. Here is strings impossible to translate:


        maxAllowedLength: "maxAllowedLength"
        minRequiredLength: "minRequiredLength"
        requiredField: "requiredField"

and plus "Invalid Email" on Registration form Email field.

Any idea how to fix? Maybe this issue is more close to accounts-core package?

Thanks

@softwarerero
Copy link
Owner

@MartinBucko: I see no reason why a text cannot be translated, but in your examples the key matches the value, so you will never any effect.

@AnyBody: If anybody finds an untranslated string please add it to the section of the corresponding package at least in the English translation, which is the blue pause for everything else.

This was referenced Dec 21, 2015
@gVolop
Copy link

gVolop commented Dec 23, 2015

what about the message that is appear on first login through the verified email link ?

screen shot 2015-12-23 at 2 11 28 pm

how can i make it with translate?

@derwaldgeist
Copy link

+1 I'm also puzzled because some of the texts appear in English in a German form. For instance, if I do not enter something into a required field, I'm getting a message like this: "Benutzername: Required Field". Any idea how I could workaround this?

@softwarerero
Copy link
Owner

@derwaldgeist: I don't see a translation that includes the string "Required Field". Where does it come from?

@derwaldgeist
Copy link

I don't know where it comes from, but it appears on the signup page of the useraccounts package if you don't enter any values into the fields. Maybe it's baked into Meteor's standard Account packages? useraccounts only refers to t9n for translations, so I don't think they added it. And I definitely did not add this text either.

It would help if this text could be at least added manually. I tried to do a t9n.map() for both EN and DE, but this did not work. It worked for other texts, but not for the requiredField key. @MartinBucko seemed to have the same problem.

@softwarerero
Copy link
Owner

Is your code online? I can't help you without understanding your problem. If you do a full text search with e.g. grep you should see where this comes from. I'm pretty sure it does not come from t9n, if it's missing fell free to add it.

@derwaldgeist
Copy link

@softwarerero
Copy link
Owner

Cool. Do you want to add a translation?

@derwaldgeist
Copy link

Yes, no problem. Shall I create a PR for that? Not sure if I will make it right, but I will try my best :-)

@gVolop
Copy link

gVolop commented Jan 19, 2016

i don't understood. requiredField translated excellent with T9!!

var pt = {
    "Required Field" : "Campo Obrigatório"
    }
T9n.map('pt', pt);

T9n.setLanguage('pt')

@derwaldgeist
Copy link

Strange. This did not work for me.

EDIT: I now saw that you are using "Required Field" instead of "requiredField" as the key. And indeed, this works! Although it is strange, I am glad to have this workaround now. Thanks @gVolop.

@gVolop
Copy link

gVolop commented Jan 19, 2016

when useraccount form is opened in your browser, please try write it in console

var pt = {
    "Required Field" : "Campo Obrigatório"
    }
T9n.map('pt', pt);
T9n.setLanguage('pt')

@derwaldgeist
Copy link

Yes, it works with that key. Thanks.

@gVolop
Copy link

gVolop commented Jan 19, 2016

ok, so all that you need it write it in client in true place,
make a map on file in the lib folder, and changes language like here:

Meteor.startup(function(){
    if(Meteor.isClient){
        T9n.setLanguage('pt');
    }
});

Good luck!

@softwarerero
Copy link
Owner

@derwaldgeist, @gVolop: If you find untranslated strings in standard libraries you can simple send a pull request to add them. This way it works for everybody out of the box, exactly this is what this issue is about. Thanks @gVolop for the explanation.

@gVolop
Copy link

gVolop commented Jan 19, 2016

yes, i sent a request, but how can i know when it's handled
this request will be updated?

@softwarerero
Copy link
Owner

@gVolop: Can you point me to the PR? I don't see it.

@gVolop
Copy link

gVolop commented Jan 19, 2016

#105 (comment)

@softwarerero
Copy link
Owner

Can you explain this? I do not understand your question.

@gVolop
Copy link

gVolop commented Jan 19, 2016

T9 is translation package for useraccount ?
it missed the text that appear on the dialog that opened after first login through verification-email link (the above dialog image)

@softwarerero
Copy link
Owner

@gVolop: The idea is to provide translations for common meteor packages like useraccount out of the box. But no one person can provide those translations for all 30+ translations. So please, if you find a missing key provide it and do not just report it, this cannot work. I, for example, do not speak Portuguese.

@gVolop
Copy link

gVolop commented Jan 20, 2016

@softwarerero u r right. it's un-possible to control all this by one person.
but i mean to option to mapping this keys, like as 'Required Field' mapping. not embeding translation for each language.
and i really dont find the above situation in useraccount texts, maybe the dialog generated by another package? maybe account-password? I will try to check it

@ghost ghost mentioned this issue Jan 25, 2016
@ghost
Copy link

ghost commented Jan 25, 2016

Sorry, made some erroneous PR. Last one should be good. My apologies.

@ghost
Copy link

ghost commented Jan 27, 2016

I have updated the italian file with suggested changes. Now I have one question that maybe require a more general discussion:
Can you hint me for "Maximum allowed length" and "Minimum required length" localization?

Adding translation for the "maxAllowedLength" "minRequiredLength" variables:
maxAllowedLengt: "Lunghezza massima consentita"
minRequiredLength: "Lunghezza minima consentita"
doesn't work.

Adding localization for the strings:
"Maximum allowed length": "Lunghezza massima consentita"
"Minimum required length": "Lunghezza minima consentita"
doesn't work either.

Adding translation for the exact strings rendered in HTML
"Maximum allowed length: 6": "Lunghezza massima consentita: 6"
"Minimum required length: 6": "Lunghezza minima richiesta: 6"
works but it's fixed, so it's not good and only a temporary solution.

For what I've seen those variables are used from "Field.prototype.validate" function inside meteor-useraccounts/core/lib/field.js at line 253 and at line 261 in conjunction with "minLength" and "maxLength" variables.

I've tried to localize the resulting error strings this way:
"Maximum allowed length: @{maxLength}": "Lunghezza massima consentita: @{maxLength}"
"Minimum required length: @{minLength}": "Lunghezza minima richiesta: @{minLength}"
without any success.

Does any of you have any hint on how to localize that kind of concatenated strings.
Thanks in advance.

@softwarerero
Copy link
Owner

The easiest thing would be to have a translation like AccountsTemplates.texts.minRequiredLength = "Maximum allowed length: @{minLength}". Then you could call T9n.get('AccountsTemplates.texts.minRequiredLength', true, {minLength: 6}). Maybe @splendido can tell if that makes sense and where AccountsTemplates is defined so you can provide a PR.

@llvasconcellos
Copy link
Contributor

@softwarerero I saw you merged my PR. Will you update atmospherejs.com with this new version?

@softwarerero
Copy link
Owner

v1.3.5 is out

@tuxyvarman
Copy link

Hi everyone,

I use the release 1.3.11 but the key "Required Field" is missing for the language Khmer and Chinese.
How can I contribute ? Or someone could do something ?

Sincerly

@softwarerero
Copy link
Owner

Hi, if you know how to do a pull request on GitHub just go ahead. If not you can just add the translations to the files and attach those files to this or a new ticket. Then I will be able to integrate it.

@tuxyvarman
Copy link

Hi softwarerero,

Thanks for your response.
Here are the two keys to add:

  • Khmer file: "Required field:" "វាលដែលត្រូវការ"
  • Chineses file: "Required field": "必填项目"

Thanks you in advance for this correction.

Anyway, i have another bug when i wanted upgrade your plugin release:

While selecting package versions:
error: No version of softwarerero:accounts-t9n satisfies all constraints: @1.3.11, @=2.0.0-beta.2
Constraints on package "softwarerero:accounts-t9n":

  • softwarerero:accounts-t9n@1.3.11 <- top level
  • softwarerero:accounts-t9n@=2.0.0-beta.2 <- top level
  • softwarerero:accounts-t9n@1.3.3 <- useraccounts:core 1.14.2 <- useraccounts:flow-routing 1.12.0

Do you have a solution ?

Thanks and best regards !

@softwarerero
Copy link
Owner

softwarerero commented Sep 11, 2017

I need to look into this. Do you remember what you did exactly to upgrade? BTW: This is not really a problem with untranslated strings. Feel free to open another issue.

@softwarerero
Copy link
Owner

Hi @tuxyvarman, I just released 2.0.2 which includes your translations for "Required field". About your bug I still do not see how this can happen.

@tuxyvarman
Copy link

Hi @softwarerero,

I just can not upgrade your plugin because I use the plugin "useraccounts" and the dependencies are not satisfied.

@softwarerero
Copy link
Owner

I still don't think this has any relation with "untranslated strings". I guess the line https://github.com/meteor-useraccounts/core/blob/master/package.js#L33 needs to be updated, you can do it in a fork.

@softwarerero
Copy link
Owner

Closing as this is basically unfixable. There will always be new language strings and untranslated languages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants