You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With a translation file from 65536 bytes, I don't observe any error on application start-up.
But with an higher size, the application triggers 2 kind of errors:
SyntaxError: Unexpected token (1:60927) while parsing /datatools-build/i18n/french.yml while parsing file: /datatools-build/i18n/french.yml
at DestroyableTransform.end [as _flush] (/datatools-build/node_modules/insert-module-globals/index.js:114:21)
at DestroyableTransform.prefinish (/datatools-build/node_modules/readable-stream/lib/_stream_transform.js:138:10)
at DestroyableTransform.emit (events.js:400:28)
at prefinish (/datatools-build/node_modules/readable-stream/lib/_stream_writable.js:619:14)
at finishMaybe (/datatools-build/node_modules/readable-stream/lib/_stream_writable.js:627:5)
at endWritable (/datatools-build/node_modules/readable-stream/lib/_stream_writable.js:638:3)
at DestroyableTransform.Writable.end (/datatools-build/node_modules/readable-stream/lib/_stream_writable.js:594:41)
at DuplexWrapper.onend (/datatools-build/node_modules/readable-stream/lib/_stream_readable.js:577:10)
at Object.onceWrapper (events.js:519:28)
at DuplexWrapper.emit (events.js:412:35) {
type: 'syntax',
filename: '/datatools-build/i18n/french.yml',
stream: [Labeled]
}
Or after another certain size (I didn't ran the test):
[ParseMore [Error]: Malformed inline YAML string ('Ceci remplacera toutes les données actives de l éditeur GTFS po).] {
parsedLine: 1564,
snippet: "confirmLoad: 'Ceci remplacera toutes les données actives de l éditeur GTFS po"
}
There is no error on this line, expected its size if I refer to this. But the English version is already about 261 characters long, where our is 329.
Expected behavior
The size for a translation file shouldn't be an issue.
The French language requires more characters to write the same thing as in English.
Also, with feature addition over time (and the need to translate more strings) will raise the errors.
Steps to reproduce the problem
Generate a translation file with a size higher than 65536 bytes.
Any special notes on configuration used
n/a
Version of datatools-ui and datatools-server if applicable (exact commit hash or branch name)
This is a mastarm bug. It's trying to load the entire translation file into a buffer with an undefined size. If the file doesn't fit into the buffer, things go south. Sometimes you get lucky and your OS allocates a buffer large enough. Either way this is not a good solution and we should prioritize moving away from mastarm. If you'd like to try your luck, here is the bug: #865
Observed behavior
With a translation file from 65536 bytes, I don't observe any error on application start-up.
But with an higher size, the application triggers 2 kind of errors:
Or after another certain size (I didn't ran the test):
There is no error on this line, expected its size if I refer to this. But the English version is already about 261 characters long, where our is 329.
Expected behavior
The size for a translation file shouldn't be an issue.
The French language requires more characters to write the same thing as in English.
Also, with feature addition over time (and the need to translate more strings) will raise the errors.
Steps to reproduce the problem
Generate a translation file with a size higher than 65536 bytes.
Any special notes on configuration used
n/a
Version of datatools-ui and datatools-server if applicable (exact commit hash or branch name)
datatools-ui: f256f0f
datatools-server: 8eda62515dcb1dc7eea728e07ae77f30ce60519e
The text was updated successfully, but these errors were encountered: