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

Improve kind views for i18n #211

Open
metbril opened this issue Aug 21, 2018 · 4 comments
Open

Improve kind views for i18n #211

metbril opened this issue Aug 21, 2018 · 4 comments

Comments

@metbril
Copy link

metbril commented Aug 21, 2018

I noticed that some of the code in the views that will eventually can be localized is split up into chunks with multiple _e() statements. This makes it hard if not impossible to properly translate these texts.

The other day I read the i18n/l10n handbook and I want to check the plugin code against these recommendations.

I will have a look and submit a PR. Initially with 1 example open for discussion. Then if we agree on how to approach this, I will add more commits for the other views.

@metbril
Copy link
Author

metbril commented Aug 21, 2018

I did some thinking... 🤔

For example.

Here are some simplified sentences to show the issue if we want proper localization.

Original English Dutch translation
Liked a post by author Vindt een bericht van auteur leuk
Bookmarked a page by author Maakte een bladwijzer van een pagina van auteur
Replied to a post by author Reageerde op een bericht van auteur
Reposted a post by author Plaatste een bericht van auteur opnieuw

As you might notice, the English verb at the beginning is split across the sentence. Unfortunately, the plugin provides some variations in the output:

  1. Icon + Text + URL/Title + by Author
  2. Text + URL/Title + by Author
  3. Icon + URL/Title + by Author
  4. Icon + Text + URL/Title
  5. Text + URL/Title
  6. Icon + URL/Title

To support translation for any possible variation, each view kind should have one translatable _e() for each of these variations. This would mean some re-arranging of logic, but also a lot of sentences to be translated.

Wouldn't this mean adding a lot of complexity and redundancy to the plugin?

What do you think?

@Ruxton
Copy link
Contributor

Ruxton commented Oct 10, 2018

the translations would have to be littered with markup for it to work effectively :/

@Ruxton
Copy link
Contributor

Ruxton commented Oct 10, 2018

This is also a duplicate/extension of your last issue, #205

@dshanske
Copy link
Owner

I'm willing to entertain suggestions on how to address it best. I don't mind rearranging the logic if it helps with that, but to @Ruxton 's point, I'd like to not make the code too confusing for people.

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

3 participants