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

Fix untranslatable translation string. #8926

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

Maikuolan
Copy link
Contributor

@Maikuolan Maikuolan commented Mar 25, 2024

Instead of splitting the strings in two to encompass the variable, better to merge as one string and then pull the variable using sprintf.

Splitting as two means it would only be possible to translate the strings sensibly to languages which use the same SVO (Subject-Verb-Object) word order as English. For languages with different word order, subsequent translations would make no sense.

By merging as one string, word order doesn't matter anymore, because translations can be arranged however needed.

Because this file (index.php) doesn't include or require any other PHP files (most notably, the locale/function.php file, which is normally responsible for defining the __ function and loading any necessary locale data), and appears instead to define the __ function itself (where it simply returns the input value verbatim, without touching any locale data), it isn't entirely clear whether any of the apparent translation strings in this file are actually intended to ever be translated. However, given that the __ function is being called for the strings instead of just echoing or printing the strings directly, I assume the __ function as defined by this file is intended as either a temporary placeholder or as a fallback function, with plans to eventually have this file utilise existing locale data, either through including/requiring locale/function.php or some other means.

Instead of splitting the strings in two to encompass the variable, better
to merge as one string and then pull the variable using sprintf.

Splitting as two means it would only be possible to translate the strings
sensibly to languages which use the same SVO (Subject-Object-Verb) word
order as English. For languages with different word order, subsequent
translations would make no sense.

By merging as one string, word order doesn't matter anymore, because
translations can be arranged however needed.
@Maikuolan
Copy link
Contributor Author

@DanielnetoDotCom DanielnetoDotCom merged commit 5b72487 into WWBN:master Mar 25, 2024
10 of 11 checks passed
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.

2 participants