]> git.proxmox.com Git - grub2.git/commit
i18n: Format large integers before the translation message
authorMiguel Ángel Arruga Vivas <rosen644835@gmail.com>
Sat, 3 Apr 2021 13:33:33 +0000 (15:33 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 13 Apr 2021 15:16:04 +0000 (17:16 +0200)
commit837fe48deb89b31710904de4e9c7dda258490e1c
tree5853b67038f0c1b109b1a9f8a2565159f60dc9f9
parente48fc8880d572d3fb00c4b02365d6d5c91603945
i18n: Format large integers before the translation message

The GNU gettext only supports the ISO C99 macros for integral
types. If there is a need to use unsupported formatting macros,
e.g. PRIuGRUB_UINT64_T, according to [1] the number to a string
conversion should be separated from the code printing message
requiring the internationalization. So, the function grub_snprintf()
is used to print the numeric values to an intermediate buffer and
the internationalized message contains a string format directive.

[1] https://www.gnu.org/software/gettext/manual/html_node/Preparing-Strings.html#No-string-concatenation

Signed-off-by: Miguel Ángel Arruga Vivas <rosen644835@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/disk/luks2.c
grub-core/efiemu/i386/loadcore64.c
grub-core/kern/arm64/dl.c
grub-core/kern/ia64/dl.c
grub-core/kern/riscv/dl.c
grub-core/kern/sparc64/dl.c
grub-core/kern/x86_64/dl.c