mainThe GNU Bourne-Again SHell - Support: sr #110718, tr_TR local problem with os-prober

 
 

sr #110718: tr_TR local problem with os-prober

Submitter:  None
Submitted:  Tue 13 Sep 2022 08:33:58 AM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Need Info
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Open
Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 20 Sep 2022 07:50:30 PM UTC, comment #4: 

I guess it depends on how much debugging output you want. Since all of these calls go through one function (gettext_printf), you could modify that function to print or log the translated string that gets passed to printf and the corresponding untranslated string.

It would probably be simpler to just log everything from every call to that function and sort it out later.

Something like

gettext_printf () {
  gettext_printf_format="$1"
  translated_printf_format="$(gettext "$gettext_printf_format")"
  shift
LOG $gettext_printf_format and $translated_printf_format HERE
  printf "$translated_printf_format" "$@"
}

Then you correlate these messages to the error you're seeing.

Chet Ramey <chet>
Group administrator
Tue 20 Sep 2022 05:46:35 PM UTC, comment #3: 

I'm trying to debug it. Any information on how is welcome.

Anonymous
Mon 19 Sep 2022 08:22:59 PM UTC, comment #2: 

It's not clear why, but it appears that printf is being handed a format string that looks like `%$' and is printing an error because it doesn't understand it. The builtin printf does not display unrecognized format characters; they are errors.

Chet Ramey <chet>
Group administrator
Tue 13 Sep 2022 09:04:44 AM UTC, comment #1: 

I forgot to add English of the error message:
#: builtins/printf.def:676
#, c-format
msgid "`%c': invalid format character"
msgstr "`%c': biçim karakteri geçersiz"

Anonymous
Tue 13 Sep 2022 08:33:58 AM UTC, original submission:  

I was trying to see why os-prober from GRUB does not work and I noticed the below error:



with LANG=tr_TR.UTF-8
/etc/grub.d# pkgdatadir=/usr/share/grub ./30_os-prober
Uyarı: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
/usr/share/grub/grub-mkconfig_lib: satır 288: printf: `$': biçim karakteri geçersiz
/etc/grub.d# LANG=en_US.UTF-8 pkgdatadir=/usr/share/grub ./30_os-prober
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found ELILO Boot Manager on /dev/nvme0n1p1@/EFI/elilo.efi/elilo.efi
menuentry 'ELILO Boot Manager (on /dev/nvme0n1p1)' --class elilo --class os $menuentry_id_option 'osprober-efi-AA0B-7A33' {
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root AA0B-7A33
chainloader /EFI/elilo.efi/elilo.efi
}



I'm uploading the scripts as they are all free software.

/etc/grub.d# LANG=en_US.UTF-8 bash --version
GNU bash, version 5.1.16(1)-release (x86_64-slackware-linux-gnu)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #53683:  30_os-prober added by None (12KiB - application/octet-stream - All the scripts)
file #53684:  os-prober added by None (4KiB - application/octet-stream - All the scripts)
file #53685:  grub-mkconfig_lib added by None (9KiB - application/octet-stream - All the scripts)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by chet (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-09-19 chet StatusNone Need Info
    2022-09-13 None Attached File- Added 30_os-prober, #53683
        Attached File- Added os-prober, #53684
        Attached File- Added grub-mkconfig_lib, #53685

    Back to the top

    Powered by Savane 3.14-f13d.
    Corresponding source code