Skip to content

Commit

Permalink
#501 attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
gagolews committed Nov 21, 2023
1 parent 979f772 commit 4c9f0e6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/r-check-other.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ jobs:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
env:
_R_CHECK_CRAN_INCOMING_: false
with:
upload-snapshots: true

- name: Install
run: |
install.packages(".", repos=NULL, type="source")
Expand All @@ -63,3 +57,9 @@ jobs:
install.packages("tinytest")
source(".devel/tinytest.R")
shell: Rscript {0}

- name: Check
env:
_R_CHECK_CRAN_INCOMING_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "error", check_dir = "check")
shell: Rscript {0}
8 changes: 6 additions & 2 deletions src/icu74/i18n/windtfmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ UnicodeString* Win32DateFormat::getTimeDateFormat(const Calendar *cal, const Loc
}


#if U_PLATFORM_HAS_WIN32_API && UCONFIG_USE_WINDOWS_LCID_MAPPING_API
#if UCONFIG_USE_WINDOWS_LCID_MAPPING_API
// TODO: This is copied in both winnmfmt.cpp and windtfmt.cpp, but really should
// be factored out into a common helper for both.
static UErrorCode GetEquivalentWindowsLocaleName(const Locale& locale, UnicodeString** buffer)
Expand Down Expand Up @@ -174,9 +174,13 @@ Win32DateFormat::Win32DateFormat(DateFormat::EStyle timeStyle, DateFormat::EStyl
: DateFormat(), fDateTimeMsg(nullptr), fTimeStyle(timeStyle), fDateStyle(dateStyle), fLocale(locale), fZoneID(), fWindowsLocaleName(nullptr)
{
if (U_SUCCESS(status)) {
#if U_PLATFORM_HAS_WIN32_API && UCONFIG_USE_WINDOWS_LCID_MAPPING_API

#if UCONFIG_USE_WINDOWS_LCID_MAPPING_API
GetEquivalentWindowsLocaleName(locale, &fWindowsLocaleName);
#else
#warning GetEquivalentWindowsLocaleName has been disabled
#endif

// Note: In the previous code, it would look up the LCID for the locale, and if
// the locale was not recognized then it would get an LCID of 0, which is a
// synonym for LOCALE_USER_DEFAULT on Windows.
Expand Down
6 changes: 4 additions & 2 deletions src/icu74/i18n/winnmfmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ static void freeCurrencyFormat(CURRENCYFMTW *fmt)
}


#if U_PLATFORM_HAS_WIN32_API && UCONFIG_USE_WINDOWS_LCID_MAPPING_API
#if UCONFIG_USE_WINDOWS_LCID_MAPPING_API
// TODO: This is copied in both winnmfmt.cpp and windtfmt.cpp, but really should
// be factored out into a common helper for both.
static UErrorCode GetEquivalentWindowsLocaleName(const Locale& locale, UnicodeString** buffer)
Expand Down Expand Up @@ -220,8 +220,10 @@ Win32NumberFormat::Win32NumberFormat(const Locale &locale, UBool currency, UErro
if (!U_FAILURE(status)) {
fLCID = locale.getLCID();

#if U_PLATFORM_HAS_WIN32_API && UCONFIG_USE_WINDOWS_LCID_MAPPING_API
#if UCONFIG_USE_WINDOWS_LCID_MAPPING_API
GetEquivalentWindowsLocaleName(locale, &fWindowsLocaleName);
#else
#warning GetEquivalentWindowsLocaleName has been disabled
#endif

// Note: In the previous code, it would look up the LCID for the locale, and if
Expand Down

0 comments on commit 4c9f0e6

Please sign in to comment.