Site-kit-wp: I18n - Improve translation strings

Created on 2 Nov 2019  Â·  9Comments  Â·  Source: google/site-kit-wp

Bug Description

Some translatable strings need improvements:

  • [x] Add 'Service name' context to strings to desambiguate (eg. "Optimize")
  • [x] Missing uppercase in service name
  • [x] Merge strings with similar ones already existing to reduce translating work
  • [x] Remove ending string spaces

Furthermore (added by @swissspidy):

  • [x] Strings in the two WP-CLI commands are wrongly translatable. They should be hardcoded to English
    The texts should be updated too. Reset all settings success is not really correct.
  • [ ] Some auth-related strings are really hard to translate as they're very technical. Users would have no clue what it means. They're also very repetitive. Example:

    • Unable to receive access token because of an unsupported grant type.

    • Unable to receive access token because of an unauthorized client.

    • Unable to receive access token because of an invalid client.

    • Unable to receive access token because of an invalid authorization code or refresh token.

      -> suggestion: Use a more generalized error message and use error codes, e.g. There was an error during authentication (code: %s)

  • [x] There is a translatable link to https://www.google.com/webmasters/tools/home which redirects to https://search.google.com/search-console/about anyway and should just be updated to that

Additional Context

  • Plugin Version 1.0.0

Acceptance criteria

  • Add 'Service name' context to strings to desambiguate (eg. "Optimize")
  • Missing uppercase in service name
  • Merge strings with similar ones already existing to reduce translating work
  • Remove ending string spaces
  • Strings in the two WP-CLI commands are wrongly translatable. They should be hardcoded to English

    • The texts should be updated too. Reset all settings success is not really correct.

  • There is a translatable link to https://www.google.com/webmasters/tools/home which redirects to https://search.google.com/search-console/about anyway and should just be updated to that

Implementation Brief

  • See #770

Changelog entry

  • Improve various translation strings by removing trailing spaces, adding a context, fixing capitalization, and more.
P1 Bug

All 9 comments

Hi Pedro

Thanks a lot for raising this! I am currently translating the plugin as well and ran into this too. We definitely want to make sure the experience for translators is as good as possible. Let's make it happen :-)

Hi Pascal,

Thanks for your feedback, I've also found this issues while translating it :)
Let me know if you need more help, for now I've pushed #770, hope it helps.

Also, despite a lot of strings are in wp.org as you've mentioned in #759, there are a lot that weren't parsed and weren'r included for translation.

Yeah I've noticed that too with all the JS strings 😕
I have to check what went wrong there. It could be an issue within the scripts, or the string extraction on the WordPress.org translation platform. Luckily I would know how to fix both 🙂

Great! :)

@swissspidy

Some auth-related strings are really hard to translate as they're very technical. Users would have no clue what it means. They're also very repetitive.

I'm not sure about that. I understand it's hard to translate them, but that is a necessity due to the very technical content they have to describe. Saying that An error occurred plus some error code is arguably less readable and user-friendly for someone encountering this.

Related improvement: #657

Would be good to find some middle ground, perhaps in a separate issue. Users and translators have no clue what an authentication proxy is or what „client“ means in this context.

@swissspidy Sounds good, let's explore this in a separate issue.

Was this page helpful?
0 / 5 - 0 ratings