Merge pull request #8613 from elpekenin/bugfix/stringify

[Bugfix] Resolve #8610: concatenated strings not translatable
This commit is contained in:
Dan Halbert 2023-11-15 12:37:24 -05:00 committed by GitHub
commit d1ddce7ebe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -91,7 +91,6 @@ msgstr ""
#: ports/atmel-samd/common-hal/alarm/__init__.c #: ports/atmel-samd/common-hal/alarm/__init__.c
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/cxd56/common-hal/analogio/AnalogOut.c ports/cxd56/common-hal/rtc/RTC.c #: ports/cxd56/common-hal/analogio/AnalogOut.c ports/cxd56/common-hal/rtc/RTC.c
#: ports/espressif/common-hal/audiobusio/I2SOut.c
#: ports/espressif/common-hal/rtc/RTC.c #: ports/espressif/common-hal/rtc/RTC.c
#: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c #: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/alarm/__init__.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/alarm/__init__.c
@ -1605,7 +1604,8 @@ msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c #: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "Only 8 or 16 bit mono with " #, c-format
msgid "Only 8 or 16 bit mono with %dx oversampling supported."
msgstr "" msgstr ""
#: ports/espressif/common-hal/wifi/__init__.c #: ports/espressif/common-hal/wifi/__init__.c

View File

@ -157,7 +157,7 @@ void common_hal_audiobusio_pdmin_construct(audiobusio_pdmin_obj_t *self,
} }
if (!(bit_depth == 16 || bit_depth == 8) || !mono || oversample != OVERSAMPLING) { if (!(bit_depth == 16 || bit_depth == 8) || !mono || oversample != OVERSAMPLING) {
mp_raise_NotImplementedError(MP_ERROR_TEXT("Only 8 or 16 bit mono with " MP_STRINGIFY(OVERSAMPLING) "x oversampling is supported.")); mp_raise_NotImplementedError_varg(MP_ERROR_TEXT("Only 8 or 16 bit mono with %dx oversampling supported."), OVERSAMPLING);
} }
turn_on_i2s(); turn_on_i2s();

View File

@ -57,7 +57,7 @@ void common_hal_audiobusio_pdmin_construct(audiobusio_pdmin_obj_t *self,
bool mono, bool mono,
uint8_t oversample) { uint8_t oversample) {
if (!(bit_depth == 16 || bit_depth == 8) || !mono || oversample != OVERSAMPLING) { if (!(bit_depth == 16 || bit_depth == 8) || !mono || oversample != OVERSAMPLING) {
mp_raise_NotImplementedError(MP_ERROR_TEXT("Only 8 or 16 bit mono with " MP_STRINGIFY(OVERSAMPLING) "x oversampling is supported.")); mp_raise_NotImplementedError_varg(MP_ERROR_TEXT("Only 8 or 16 bit mono with %dx oversampling supported."), OVERSAMPLING);
} }
// Use the state machine to manage pins. // Use the state machine to manage pins.