3

I have a source format that has negative indexes:

@-1002= "What should be done with all components that are NOT YET installed?\n[I]nstall them, [S]kip them, [A]sk about each one?"

@-1003= "What should be done with all components that are ALREADY installed?\n[R]e-install them, [U]ninstall them, [S]kip them, [A]sk about each one? "

Does PO file format support negative indexes or any other way to be able to have those strings included?

ALIENQuake
  • 520
  • 3
  • 12
  • 28

1 Answers1

1
  1. PO file format does not support negative indexes. The PO file format is a plain text format that is used to store translation data.

  2. If you have source format that has negative indexes, you'll need to convert them to positive integers before you can store them in a PO file.

    • use abs() function to return absolute value of a number

    • if you want to use %s in the msgstr, you'll need to convert the PO file to different format, such as gettext format. To convert PO file to the gettext format, you can use the following command

      msgfmt -o output.po input.po
      
  • Was this answer written by ChatGPT? It doesn't seem to make any sense. PO format does not support negative indexes, *but it doesn't support positive indexes either*, so what are we even talking about here? – Lauri Nurmi Jun 10 '23 at 21:00
  • If you think it is written by ChatGPT, then why don't ask your question from there?! – Farkhod Abdukodirov Jun 11 '23 at 23:54
  • Can you enlighten me what do positive indexes mean in the context of PO files? – Lauri Nurmi Jun 13 '23 at 10:10
  • Look man if you are looking for an argument go find yourself another place! If you are not satisfied with the answer just report it by flagging! Moderators will take care of it. – Farkhod Abdukodirov Jun 13 '23 at 11:32
  • I think comments are the proper place for asking clarification to an answer. I have now asked twice. – Lauri Nurmi Jun 13 '23 at 13:10