Skip to content

Instantly share code, notes, and snippets.

@nerun
Last active June 28, 2023 01:03
Show Gist options
  • Save nerun/efdd2f15a431194d6d4ca14c38aca25a to your computer and use it in GitHub Desktop.
Save nerun/efdd2f15a431194d6d4ca14c38aca25a to your computer and use it in GitHub Desktop.
Example of .po file
msgid ""
msgstr ""
"Project-Id-Version: Exemplo\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2021-08-05 14:45-0300\n"
"PO-Revision-Date: 2023-06-27 22:02-0300\n"
"Last-Translator: Daniel Dias Rodrigues <danieldiasr@gmail."
"com>\n"
"Language-Team: \n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Poedit 3.0.1\n"
msgid "Let’s make the web multilingual."
msgstr "Vamos tornar a web multilíngue."
msgid ""
"We connect developers and translators around the globe on "
"Lingohub for a fantastic localization experience."
msgstr ""
"Nós conectamos desenvolvedores e tradutores ao redor do mundo "
"no Lingohub para uma fantástica experiência de localização."
msgid "Welcome back, %1$s! Your last visit was on %2$s"
msgstr "Bem-vindo de volta, %1$s! Sua última visita foi em %2$s"
msgid "%d page read."
msgid_plural "%d pages read."
msgstr[0] "%d página lida."
msgstr[1] "%d páginas lidas."
@nerun
Copy link
Author

nerun commented Aug 5, 2021

Link

Instruções simples:

  • Primeiro crie um arquivo POT a partir do seu arquivo bash. No terminal digite:
    $ bash --dump-po-strings SeuScript > SeuScript.pot
  • Atualizar arquivo PO com nova versão de arquivo POT:
    msgmerge --update hello.po hello.pot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment