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

Tricky translation string for post author, time and source #56

Open
rjmackay opened this issue May 17, 2016 · 3 comments
Open

Tricky translation string for post author, time and source #56

rjmackay opened this issue May 17, 2016 · 3 comments

Comments

@rjmackay
Copy link
Contributor

rjmackay commented May 17, 2016

The pattern library creates some tricky to translate strings https://www.dropbox.com/s/qz7f0ui1v3me75f/Screenshot%202016-05-17%2016.06.11.png?dl=0

"Jess Shorland, 45 mins, via SMS" would ideally be built from a single translation string of "{Name}, {post date}, via {source}"
This allows translators to reorder the phrase as appropriate for their language. However because formatting and link around the user name (and probably the avatar too) we have to either:

  • include HTML in the translation and hope translators don't break it
  • split the string and make it impossible to reorder the sentence when appropriate

Could we change the format here and make theses clearly 3 separate elements? .. or maybe theres another better solution.
We can work around this in the client, but the solutions are awkward.

@brandonrosage
Copy link
Contributor

brandonrosage commented Jul 11, 2016

I believe I've solved for this in recent revisions to "postcards." For example, in this Timeline example, avatar, name, time, and source are all separate.

Does that address the problem, @rjmackay?

@sethburtonhall
Copy link

@brandonrosage each item needs to have translate applied so I believe the desired outcome would be

<a href="" class="metadata-author" translate>{name)</a>, <span translate>{post_date}</span> <span translate>{source}</span>

or maybe just one <span> like so

<a href="" class="metadata-author" translate>{Name)</a>, <span translate>{post_date} {source}</span>

@rjmackay can you chime in here?

@sethburtonhall sethburtonhall self-assigned this Jul 15, 2016
@rjmackay
Copy link
Contributor Author

We haven't solved this. Because we still have HTML wrapping the author we can't combine author into the same translation string as source + date. Its really made worse by the commas between each portion. We end up with a translation that begins with a comma like: ", {{date}}, via {{source}}"
I think in the client I just dropped the , from the text entirely.

TBH this is super minor - so we could just ignore it for now.

@sethburtonhall sethburtonhall removed their assignment Jul 22, 2016
@jshorland jshorland removed the Icebox label Nov 1, 2017
@zube zube bot removed the Icebox label Jan 29, 2018
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

4 participants