Skip to content

Comments

Improve i18n of new task identifier related strings#52019

Merged
isidorn merged 2 commits intomicrosoft:masterfrom
qcz:patch-6
Jun 15, 2018
Merged

Improve i18n of new task identifier related strings#52019
isidorn merged 2 commits intomicrosoft:masterfrom
qcz:patch-6

Conversation

@qcz
Copy link
Contributor

@qcz qcz commented Jun 15, 2018

The new task identifier related strings introduced by @isidorn in cc5c103 can have a task Id substituted or not, in this case 'specified' string will be used. In this current form it cannot be correctly translated to Hungarian (and possibly to other languages). I split the two possibilities (one with task ID and the other without task Id) to two distinct error messages in both cases.

const taskDisplayName = typeof taskId === 'string' ? `'${taskId}'` : nls.localize('specified', "specified");
if (!task) {
return TPromise.wrapError(errors.create(nls.localize('DebugTaskNotFound', "Could not find the task {0}.", taskDisplayName)));
if (typeof taskId === 'string')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use brackets {} after an if
Also based on the state construct the message and then in bot hcases just wrap error. Same as you do below

@isidorn
Copy link
Collaborator

isidorn commented Jun 15, 2018

Thanks for your PR. I have added a comment. Once you adress this we can merge in this PR

@isidorn isidorn self-assigned this Jun 15, 2018
@isidorn isidorn added this to the June 2018 milestone Jun 15, 2018
@qcz
Copy link
Contributor Author

qcz commented Jun 15, 2018

@isidorn: Done!

@isidorn isidorn merged commit f31466f into microsoft:master Jun 15, 2018
@isidorn
Copy link
Collaborator

isidorn commented Jun 15, 2018

Thanks for the pr. That was sloppy, had to fix some issues (formating, message not passed ,wrong id used)
0a0169b

@qcz qcz deleted the patch-6 branch October 1, 2018 06:12
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants