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

Translation fix in studio: For better translation in unit.html #3121

Merged
merged 1 commit into from
Mar 31, 2014

Conversation

louyihua
Copy link
Contributor

As the sentence in unit.html is splitted into three parts due to the varible release_date may be None, it breaks the integrity of a sentence.
Different language may have different word or event grammer order, so if a sentence is breaked into three parts, translators cannot adjust the word orders to create a good translation.
This fix tries to combine the sentence together so that translators can freely change the orders of sentence parts to make a good translation.

@louyihua louyihua changed the title Translation fix in studio: For better translation Translation fix in studio: For better translation in unit.html Mar 29, 2014
@singingwolfboy
Copy link
Contributor

@cahrens or @andy-armstrong, could one of you review this?

@andy-armstrong
Copy link
Contributor

Thanks for looking into this. This looks like an improvement, but my preference would be to remove all string splicing entirely. I would instead have two translation strings for the entire sentence, i.e. something like:

% if release_date is not None:
   ${_("This unit is scheduled to be released to <strong>students</strong> with the subsection {link_start}{name}{link_end}") [...]
% else
   ${_("This unit is scheduled to be released to <strong>students</strong> on {release-date} with the subsection {link_start}{name}{link_end}") [...]
% endif

I think this gives the translators the most freedom. Does that seem reasonable?

else:
release_date_string = u""
%>
${_("This unit is scheduled to be released to <strong>students</strong> {release_date_string}with the subsection {link_start}{name}{link_end}").format(
Copy link

Choose a reason for hiding this comment

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

I would worry that the translators will mess up the space (the fact that release_date_string ends with a space). They will either leave off the trailing space on release_date_string, or add an extra space in this sentence. I think it would be less error-prone to go back to the if/else approach.

As the sentence in unit.html is splitted into three parts due to the varible release_date may be None, it breaks the integrity of a sentence.
Different language may have different word or event grammer order, so if a sentence is breaked into three parts, translators cannot adjust the word orders to create a good translation.
So this fix tries to combine the sentence together.
@louyihua
Copy link
Contributor Author

@andy-armstrong OK, I just changed it to two sentences.

@andy-armstrong
Copy link
Contributor

👍 Thanks, @louyihua, this looks good to me. I think this probably satisfies @cahrens concern too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants