The l10n-dev export command produces a bundle.l10n.json file which is not actually used by l10n but which serves as a reference for constructing bundle.l10n.<locale>.json files.
Apparently, the bundle.l10n.json file is built based on the discovery of the texts used by the vscode.l10n.t function and the text strings are saved, without formatting, in the order they appear in TypeScript or JavaScript files.
Any modification (moving a portion of code) in the TypeScript or JavaScript files has an impact on the construction of the bundle.l10n.json file.
The work of creating and especially maintaining bundle.l10n.<locale>.json files would be easier if the bundle.l10n.json file was formatted and sorted on key texts, possibly with options to enable formatting and / or sorting.
Formatted: this can be an effect of working on Windows platform... CRLF expected instead of LF, add replace("\r(\n)?","\r\n") on result of JSON.stringify? use "\t" insteadd of 2 as space value?
See:
Hi,
The l10n-dev export command produces a
bundle.l10n.json
file which is not actually used by l10n but which serves as a reference for constructingbundle.l10n.<locale>.json
files.Apparently, the
bundle.l10n.json
file is built based on the discovery of the texts used by thevscode.l10n.t
function and the text strings are saved, without formatting, in the order they appear in TypeScript or JavaScript files. Any modification (moving a portion of code) in the TypeScript or JavaScript files has an impact on the construction of thebundle.l10n.json
file.The work of creating and especially maintaining
bundle.l10n.<locale>.json
files would be easier if thebundle.l10n.json
file was formatted and sorted on key texts, possibly with options to enable formatting and / or sorting.Formatted: this can be an effect of working on Windows platform...
CRLF
expected instead ofLF
, addreplace("\r(\n)?","\r\n")
on result of JSON.stringify? use"\t"
insteadd of2
as space value? See:Sorted: add a sort on key of
mergedJson
ingetL10nJson
?And perhaps add source path and source line number, (position.row), column number, (position.column), as a automatic comment.
Thanks.