src, doc: improve documentation and error message for ICU data fallback#49666
Closed
joyeecheung wants to merge 2 commits intonodejs:mainfrom
Closed
src, doc: improve documentation and error message for ICU data fallback#49666joyeecheung wants to merge 2 commits intonodejs:mainfrom
joyeecheung wants to merge 2 commits intonodejs:mainfrom
Conversation
Collaborator
|
Review requested:
|
richardlau
approved these changes
Sep 15, 2023
Collaborator
25 tasks
Collaborator
jasnell
reviewed
Sep 16, 2023
| namespace i18n { | ||
|
|
||
| bool InitializeICUDirectory(const std::string& path); | ||
| bool InitializeICUDirectory(const std::string& path, std::string* error); |
Member
There was a problem hiding this comment.
Just curious, why std::string* and not const std::string&?
Member
Author
There was a problem hiding this comment.
This is an out parameter, the caller gets the error string if it fails
jasnell
approved these changes
Sep 16, 2023
32 tasks
Collaborator
33 tasks
81991de to
ac4edac
Compare
Member
Author
|
Fixed the line length to make the linter happy |
Collaborator
Previously when we fail to initialize ICU data, the error message is ``` could not initialize ICU (check NODE_ICU_DATA or --icu-data-dir parameters) ``` This patch updates it to something similar to: ``` U_FILE_ACCESS_ERROR: Could not initialize ICU. Check the directory specified by NODE_ICU_DATA or --icu-data-dir contains icudt73l.dat and it's readable ``` Where the expected data file name is the same as U_ICUDATA_NAME.
This patch: - Documents `--with-icu-default-data-dir` and its precedence - Elaborates a bit more about the format of the name of the expected data file.
ac4edac to
930aba9
Compare
Member
Author
|
Apparently test-icu-data-dir was matching the old error messages. Updated the test a bit. |
Member
Author
|
@richardlau @jasnell I've updated the test for new error message matches. Can you take a look again? Thanks |
Collaborator
Collaborator
richardlau
approved these changes
Sep 18, 2023
Collaborator
This was referenced Sep 19, 2023
Collaborator
|
Landed in c2cd744...db5e993 |
nodejs-github-bot
pushed a commit
that referenced
this pull request
Sep 22, 2023
Previously when we fail to initialize ICU data, the error message is ``` could not initialize ICU (check NODE_ICU_DATA or --icu-data-dir parameters) ``` This patch updates it to something similar to: ``` U_FILE_ACCESS_ERROR: Could not initialize ICU. Check the directory specified by NODE_ICU_DATA or --icu-data-dir contains icudt73l.dat and it's readable ``` Where the expected data file name is the same as U_ICUDATA_NAME. PR-URL: #49666 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
nodejs-github-bot
pushed a commit
that referenced
this pull request
Sep 22, 2023
This patch: - Documents `--with-icu-default-data-dir` and its precedence - Elaborates a bit more about the format of the name of the expected data file. PR-URL: #49666 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
ruyadorno
pushed a commit
that referenced
this pull request
Sep 28, 2023
Previously when we fail to initialize ICU data, the error message is ``` could not initialize ICU (check NODE_ICU_DATA or --icu-data-dir parameters) ``` This patch updates it to something similar to: ``` U_FILE_ACCESS_ERROR: Could not initialize ICU. Check the directory specified by NODE_ICU_DATA or --icu-data-dir contains icudt73l.dat and it's readable ``` Where the expected data file name is the same as U_ICUDATA_NAME. PR-URL: #49666 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
ruyadorno
pushed a commit
that referenced
this pull request
Sep 28, 2023
This patch: - Documents `--with-icu-default-data-dir` and its precedence - Elaborates a bit more about the format of the name of the expected data file. PR-URL: #49666 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
alexfernandez
pushed a commit
to alexfernandez/node
that referenced
this pull request
Nov 1, 2023
Previously when we fail to initialize ICU data, the error message is ``` could not initialize ICU (check NODE_ICU_DATA or --icu-data-dir parameters) ``` This patch updates it to something similar to: ``` U_FILE_ACCESS_ERROR: Could not initialize ICU. Check the directory specified by NODE_ICU_DATA or --icu-data-dir contains icudt73l.dat and it's readable ``` Where the expected data file name is the same as U_ICUDATA_NAME. PR-URL: nodejs#49666 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
alexfernandez
pushed a commit
to alexfernandez/node
that referenced
this pull request
Nov 1, 2023
This patch: - Documents `--with-icu-default-data-dir` and its precedence - Elaborates a bit more about the format of the name of the expected data file. PR-URL: nodejs#49666 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
src: improve error message when ICU data cannot be initialized
Previously when we fail to initialize ICU data, the error message is
This patch updates it to something similar to:
Where the expected data file name is the same as U_ICUDATA_NAME.
doc: improve documentation about ICU data fallback
This patch:
--with-icu-default-data-dirand its precedencedata file.