Skip to content

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

Merged
andy-armstrong merged 1 commit into
openedx:masterfrom
louyihua:translation-fix-cms
Mar 31, 2014
Merged

Translation fix in studio: For better translation in unit.html#3121
andy-armstrong merged 1 commit into
openedx:masterfrom
louyihua:translation-fix-cms

Conversation

@louyihua

Copy link
Copy Markdown
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
Copy Markdown
Contributor

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

@andy-armstrong

Copy link
Copy Markdown
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?

Comment thread cms/templates/unit.html Outdated

Copy link
Copy Markdown

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
Copy Markdown
Contributor Author

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

@andy-armstrong

Copy link
Copy Markdown
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