Monaco-editor: Some strings not localized

Created on 16 Apr 2018  路  15Comments  路  Source: microsoft/monaco-editor


monaco-editor version:
0.9.0 and later (including latest, 0.14.3)

Browser:
All

OS:
All

Steps or JS usage snippet reproducing the issue:
Use the test page for German localizations at https://github.com/Microsoft/monaco-editor-samples/blob/master/browser-amd-localized/index.html

The following sections of localizable strings are not localized:

  • vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp
  • vs/editor/standalone/browser/inspectTokens/inspectTokens
  • vs/editor/standalone/browser/quickOpen/gotoLine
  • vs/editor/standalone/browser/quickOpen/quickCommand
  • vs/editor/standalone/browser/quickOpen/quickOutline
  • vs/editor/standalone/browser/standaloneCodeEditor

0.14.3 example:
image

important

Most helpful comment

Thank you for making this a priority. Localization issues will block us from taking a newer Monaco release in Azure DevOps, and there are fixes/changes over the past few months that we'd love to deploy. Please just let us know when more information is available so we can plan accordingly.

All 15 comments

@dbaeumer Are we pushing/pulling these strings to transifex ?

@alexandrudima no they are not :-)

Resource that are pushed to transifex need to be listed in build\lib\i18n.resources.json. I have added the standalone editor part.

Actually the file has a vs\editor section so standalone should be included by default. Need to see why this is not the case ?

Reopening the issue. Actually this is more complicated. What be push to transifex is what we bundle into our large JS files (the stuff that gets produced by the optimze step). Since the standalone folder is not bundled we don't upload any resource to transifex. This was done to not translated anything that we don't ship. Two options:

  • we tolorate this. I am not sure what our statement regarding translating the standalone editor is
  • we add an item to our deb to change the VS Code transifex push task to allow for not bundled resources.

@alexandrudima opinions ?

We could treat the standalone like an extension and try to resuse some code from there.

It looks like someone removed these localizations in this commit:
3af180691c ("Cleaned up unused translation files. Merged translations from Transifex.", 2017-04-26)

Then later someone else moved the code whose localizations were removed to src/vs/editor/standalone:
1171b53005 ("Move standalone editor specific code to vs/editor/standalone", 2017-06-19)

Any progress to report on this issue? Microsoft/vscode#48108 was closed with a sound explanation (not wanting to push all of vscode's resource strings to monaco-editor). However, it isn't clear how the issue here will be resolved.

@alexandrudima adding you as well based on the discussion from yesterday. I will try to summarize:

  • things got more complicated since we are publishing the editor now as AMD and UMD and in UMD we can't use the tricks we use for AMD (a loader plugin to inject the translations very early into the loader process)
  • VS Code got converted to language packs and we need to think about how the standalong editor could reuse the translations

An alternative would be to publish the keys and the English strings and to ask every product that embeds the stand alone editor to translate these strings. This would at the end be the cleanest solution since the strings we would pull from the VS Code translation might have the term VS Code in the translated value.

Thank you for making this a priority. Localization issues will block us from taking a newer Monaco release in Azure DevOps, and there are fixes/changes over the past few months that we'd love to deploy. Please just let us know when more information is available so we can plan accordingly.

I revived that translation for the Monaco editor in the build process. See https://github.com/Microsoft/vscode/issues/71065

So, am I correct in that all localizations are completely busted in Monaco at the moment?

When I run npm install monaco-editor and navigate to: /node_modules/monaco-editor/min/vs/editor
All of the editor.main.nls.XY.js files are in English. I see no localizations at all for any of the files presently.

Closed with 0.17.0. Thanks! :)

Was this page helpful?
0 / 5 - 0 ratings