-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
src, doc: improve documentation and error message for ICU data fallback #49666
Conversation
Review requested:
|
@@ -38,7 +38,7 @@ | |||
namespace node { | |||
namespace i18n { | |||
|
|||
bool InitializeICUDirectory(const std::string& path); | |||
bool InitializeICUDirectory(const std::string& path, std::string* error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, why std::string*
and not const std::string&
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an out parameter, the caller gets the error string if it fails
81991de
to
ac4edac
Compare
Fixed the line length to make the linter happy |
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
Apparently test-icu-data-dir was matching the old error messages. Updated the test a bit. |
@richardlau @jasnell I've updated the test for new error message matches. Can you take a look again? Thanks |
Landed in c2cd744...db5e993 |
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>
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>
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>
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>
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>
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>
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-dir
and its precedencedata file.