Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

Add translator note for multilingual strings. #623

Conversation

peterwilsoncc
Copy link
Contributor

Description

  • adds a translator note for the strings “Stories, historias, iсторії, iστορίες” to clarify that the strings are intended to contain the word "Stories" in four languages.
  • Modifies the context for each of the sample/placeholder headings to be consistent. In one location it differed.

Screenshots

N/A

Testing Instructions

  1. Ensure the addition of the line breaks within the headings has not impacted the display negatively.

Copy link

Preview changes

You can preview these changes by following the link below:

I will update this comment with the latest preview links as you push more changes to this PR.

Note

The preview sites are created using WordPress Playground. You can add content, edit settings, and test the themes as you would on a real site, but please note that changes are not saved between sessions.

Copy link

github-actions bot commented Oct 22, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: peterwilsoncc <[email protected]>
Co-authored-by: juanfra <[email protected]>
Co-authored-by: audrasjb <[email protected]>
Co-authored-by: swissspidy <[email protected]>
Co-authored-by: SergeyBiryukov <[email protected]>
Co-authored-by: carolinan <[email protected]>
Co-authored-by: beafialho <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@peterwilsoncc peterwilsoncc requested a review from juanfra October 22, 2024 22:30
Copy link
Member

@juanfra juanfra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Peter! The addition of the line breaks in comments don't seem to be impacting the display.

Screen.Recording.2024-10-23.at.09.56.55.mov

I have a question regarding the translators comment. What would the expectation be for translators with the following part of the comment: "with the first item in the locale's language."

If I'd be translating to Spanish and I'd read that comment I'd think that the translated string should be" “Historias, stories, iсторії, iστορίες“. In French “Histoires, historias, iсторії, iστορίες“.

Should we give the direction of having the first word in the locale's language or should we leave it open so that the translators take care of it? I am asking this as I am not sure how this would translate to other languages in some locales and if it'd be affecting the display of some patterns.

@juanfra juanfra added [Type] Enhancement A suggestion for improvement. Internationalization (i18n) Issues or PRs related to internationalization efforts labels Oct 23, 2024
@peterwilsoncc
Copy link
Contributor Author

Should we give the direction of having the first word in the locale's language or should we leave it open so that the translators take care of it? I am asking this as I am not sure how this would translate to other languages in some locales and if it'd be affecting the display of some patterns.

I'm not sure worry. My thinking was that having it in the locale's language first would make it clearer to people making use of the theme but I'll check in with a couple of people on translation teams.

@juanfra
Copy link
Member

juanfra commented Oct 24, 2024

Thank you Peter.

@beafialho as a non-native English speaker and designer of the theme what are your thoughts on this? "Stories" translates to "Histórias" in Portuguese.

@carolinan do you have any thoughts on this?

Thank you all!

Copy link
Contributor

@audrasjb audrasjb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a comment about the accessibility of this string :)

patterns/banner-poster.php Outdated Show resolved Hide resolved
@audrasjb
Copy link
Contributor

I don't have any issue with keeping this text untranslated in French locale, but if we want this theme to be accessibility-ready (which should be our goal), I need to indicate language changes with HTML markup.

@beafialho
Copy link
Contributor

@beafialho as a non-native English speaker and designer of the theme what are your thoughts on this? "Stories" translates to "Histórias" in Portuguese.

@juanfra that's right, "Histórias" is the correct translation for Portuguese.

Should we give the direction of having the first word in the locale's language or should we leave it open so that the translators take care of it?

Having the first word in the locale's language seems ok to me.

@audrasjb
Copy link
Contributor

I'm not opposed to have multilangual strings, but to claim the accessibility-ready tag, Twenty Twenty-Five will have to depend on polyglots using correct html markup.
Another solution is to make this string untranslatable, and to hardcode these <span lang="XX"> tags for each individual string.
Eventually, this would be our best option here.

@peterwilsoncc
Copy link
Contributor Author

Another solution is to make this string untranslatable, and to hardcode these <span lang="XX"> tags for each individual string.

I'd like to keep it translatable so the locale's language can be included in the string. If the string was Historias, iсторії, iστορίες, истории I'd have no idea what it was conveying so I imagine the same would be true for the roughly 50% of people using a non-english version of WordPress.

I've asked in the #polyglots slack channel (requires login via chat.w.org) for approval to update the string to be accessible as we a re post string freeze.

I'll push a fix to include lang attributes shortly.

@peterwilsoncc peterwilsoncc force-pushed the fix/translator-notes-for-multilingual-strings branch from 2529294 to 0dcd053 Compare October 24, 2024 22:08
@audrasjb
Copy link
Contributor

Thanks @peterwilsoncc the new changeset looks good to me! 👍

@peterwilsoncc
Copy link
Contributor Author

@tobifjellner has signed off on the change in the polyglots slack channel, see this tread.

@SergeyBiryukov
Copy link
Member

Left a minor formatting suggestion, looks good to me otherwise 👍

Co-authored-by: Sergey Biryukov <[email protected]>
@carolinan
Copy link
Contributor

The lang attribute is not a requirement for the accessibility-ready tag: https://make.wordpress.org/themes/handbook/review/accessibility/required/

@carolinan carolinan merged commit 294ceca into WordPress:trunk Oct 25, 2024
6 checks passed
@peterwilsoncc peterwilsoncc deleted the fix/translator-notes-for-multilingual-strings branch October 28, 2024 00:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Internationalization (i18n) Issues or PRs related to internationalization efforts [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants