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

[loc][Query] Context and better support for plurals #48144

Closed
josefhosek opened this issue Apr 18, 2018 · 2 comments
Closed

[loc][Query] Context and better support for plurals #48144

josefhosek opened this issue Apr 18, 2018 · 2 comments
Assignees
Labels
l10n-platform Localization platform issues (not wrong translations) verified Verification succeeded
Milestone

Comments

@josefhosek
Copy link

For string below community member asked to provide context for placeholder, and also support for plurals in different languages. As it is probably difficult to translate in current state.

Original comment
BG ISSUE - What are the variables? Also, needs support for plurals.
by lyubomirv, 5 months ago
PL ISSUE - This needs better support for plurals to be translated nicely.
by wojtekmaj, 5 months ago

Context
src/vs/editor/browser/widget/diffReview:English (en):plaintext:header

Resource
vs_editor

String Hash
6434f4fde2ca6a67bdc0778b3406a765

String text
Difference {0} of {1}: original {2}, {3} lines, modified {4}, {5} lines

@josefhosek josefhosek added the l10n-platform Localization platform issues (not wrong translations) label Apr 18, 2018
@dbaeumer dbaeumer assigned alexdima and unassigned dbaeumer Apr 19, 2018
@alexdima alexdima added this to the April 2018 milestone Apr 19, 2018
@alexdima
Copy link
Member

I've extracted the plural to separate nls calls and I've added explanations:

header.setAttribute('aria-label', nls.localize({
	key: 'header',
	comment: [
		'This is the ARIA label for a git diff header.',
		'A git diff header looks like this: @@ -154,12 +159,39 @@.',
		'That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.',
		'Variables 0 and 1 refer to the diff index out of total number of diffs.',
		'Variables 2 and 4 will be numbers (a line number).',
		'Variables 3 and 4 will be "no lines", "1 line" or "X lines", localized separately.'
	]
}, "Difference {0} of {1}: original {2}, {3}, modified {4}, {5}", (diffIndex + 1), this._diffs.length, minOriginalLine, originalChangedLinesCntAria, minModifiedLine, modifiedChangedLinesCntAria));

@josefhosek
Copy link
Author

@alexandrudima Thanks! We just got one additional comment where this change to your comment was suggested:
Current: Variables 3 and 4 will be "no lines", "1 line" or "X lines", localized separately.
Fix: Variables 3 and 5 will be "no lines", "1 line" or "X lines", localized separately.

Can you please confirm this? Thanks!

@josefhosek josefhosek reopened this Apr 24, 2018
@mjbvz mjbvz added the verified Verification succeeded label Apr 26, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 8, 2018
alexdima added a commit that referenced this issue Aug 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
l10n-platform Localization platform issues (not wrong translations) verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants