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

Missing/fixing language strings #254

Merged
merged 9 commits into from
Jun 8, 2020

Conversation

juliendude
Copy link
Contributor

Missing lang string for placeholder, button and messages.

  • Added PLUGIN_LOGIN.USERNAME_EMAIL to username placeholder in login.md
  • Added PLUGIN_LOGIN.PASSWORD to password placeholder in login.md
  • Added PLUGIN_LOGIN.USERNAME_EMAIL to username placeholder in reset.md
  • Added PLUGIN_LOGIN.PASSWORD to password placeholder in reset.md
  • Changed BTN_RESET to BTN_RESET_PASSWORD in language file en.yaml , fr.yaml and in reset-form.html.twig
  • Added BTN_SUBMIT_PROFILE in language file en.yaml , fr.yaml and in profile.md. Reason: in some languages (e.g.: French) the translation of “submit” differs depending on the context. In the context of profile.md, we are saving changes.
  • Created PLUGIN_LOGIN.PROFILE_UPDATED in en.yaml and fr.yaml for confirmation message that profile has been updated
  • Added PLUGIN_LOGIN.PROFILE_UPDATED to profile.md
  • Created ENTER_EMAIL for “Enter your email” in en.yaml and fr.yaml
  • Created ENTER_NEW_PASSWORD for “Enter new password” in en.yaml and fr.yaml
  • Added ENTER_EMAIL and ENTER_NEW_PASSWORD to profile.md
  • Created ENTER_PASSWORD for “Enter password” in en.yaml and fr.yaml
  • Created ENTER_PASSWORD_AGAIN for “Enter the password again” in en.yaml and fr.yaml
  • Created REGISTRATION_THANK_YOU for “Thank you for registering.” in en.yaml and fr.yaml
  • Added ENTER_PASSWORD , ENTER_PASSWORD_AGAIN and REGISTRATION_THANK_YOU to register.md

I hope it helps. Don't hesitate if you have any question or if I can help some more the great grav project.

Since I am not sure the reasoning behind it, I did not add label in the field attribute on some pages (e.g.: reset.md). See bug #253

Julien B and others added 8 commits June 4, 2020 10:30
This makes the lang string more specific. And allow to have a simple “reset” button (e.g.: profile.md)
+ new string created for submit profile as in save profile context
+ PLUGIN_LOGIN.PROFILE_UPDATED for profile updated message
+ ENTER_EMAIL: "Enter your email"
+ ENTER_NEW_PASSWORD: "Enter new password"
+ ENTER_PASSWORD
+ ENTER_PASSWORD_AGAIN
+ REGISTRATION_THANK_YOU
@Vivalldi
Copy link
Collaborator

Vivalldi commented Jun 4, 2020

Looks good so far. Since we're remapping BTN_RESET to BTN_RESET_PASSWORD (due to addition of plain BTN_RESET the already existing language files need to reflect this change as well

@juliendude
Copy link
Contributor Author

Hi @Vivalldi
I'm not sure I follow you with "existing language files need to reflect this change as well" ?
Do you mean that I missed something?
BTN_RESET_PASSWORD is on line 19 in reset-form.html.twig. Is that what you meant?

@Vivalldi
Copy link
Collaborator

Vivalldi commented Jun 4, 2020

Hi!

The en.yaml (and fr.yaml) changed

BTN_RESET: Reset Password

to

BTN_RESET: Reset
BTN_RESET_PASSWORD: Reset Password

es.yaml (and other languages) were not changed. Meaning that those languages will fallback to en for BTN_RESET_PASSWORD.

There's also the case where now in some languages BTN_RESET can either mean password reset or just reset

I haven't had time to review the rest of the PR but I'm sure the Andy or Matias will chime in.


p.s. Welcome to the Grav community! I see you're a first-time contributor. Glad to have you onboard 🎉

@juliendude
Copy link
Contributor Author

Good point on other language files !

Since I don't speak these languages, do you suggest that I still add the strings with the English text?
I'm all ears. Let know the way it gets done in the Grav development.

I also wanted to order the strings by alphabetical order to clean this up a bit, but I don't want to impose.

ps: thank you for your welcoming words. I really enjoy Grav. It's actually fun to develop with.

@ricardo118
Copy link

you could order the strings alphabetically but usually they might be organized in sections of content, regarding the text in english since we dont want the fallback to happen then yes we would need english across all languages manually.

Another big + to the community, join the Discord the core devs and the community is active and helpful

@Vivalldi
Copy link
Collaborator

Vivalldi commented Jun 5, 2020

So what I would do is rename BTN_RESET to BTN_RESET_PASSWORD in the other languages as those strings shouldn't change. And then you can just leave the BTN_RESET empty or go with the English strings as @ricardo118 mentioned

@rhukster
Copy link
Member

rhukster commented Jun 5, 2020

This looks good to me, is it ready to merge???

@juliendude
Copy link
Contributor Author

Thank you @ricardo118 and @Vivalldi, I'll push these changes.

@rhukster Sorry for my late reply, just got back from a long week-end out of the city. I'll push the latest changes tomorrow (Monday) the latest and update the PR. Thank you for waiting.

@juliendude
Copy link
Contributor Author

@rhukster as promise, here is the new PR where I applied the same changes and new strings to the rest of the language files.
FYI in case you are not aware. Some language files are missing a lot of string found in the English file. Unfortunately, I do not speak these languages. I can only help with English and French.

@rhukster rhukster merged commit e581819 into getgrav:develop Jun 8, 2020
@rhukster
Copy link
Member

rhukster commented Jun 8, 2020

thanks so much! merged...

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

Successfully merging this pull request may close these issues.

4 participants