Questions tagged [po]

PO files are the format of the GNU gettext translation files.

PO files are the format of the GNU gettext translation files.

A PO (Portable Objects) file is made up of many entries, each entry holding the relation between an original untranslated string and its corresponding translation. All entries in a given PO file usually pertain to a single project, and all translations are expressed in a single target language.

They usually have to be compiled in MO (Machine Object) file to be used in applications.

263 questions
9
votes
2 answers

Combining keys and full text when working with gettext and .po files

I am looking at gettext and .po files for creating a multilingual application. My understanding is that in the .po file msgid is the source and msgstr is the translation. Accordingly I see 2 ways of defining msgid: Using full text (e.g. "My name is…
Max
  • 12,794
  • 30
  • 90
  • 142
7
votes
2 answers

Is there a PHP library for parsing gettext PO POT files?

if is not in PHP, is possible use some command line tools which convert PO file into some structured format e.g. XML or some other which I can simple process in PHP?
MarekLi
  • 941
  • 1
  • 12
  • 18
7
votes
1 answer

Django Localization msgmerge error

I have a medium sized Django project and was using Django Translation . While i run the command django-admin.py makemessages -l fr . I get the below error while using french. CommandError: errors happened while running msgmerge msgmerge: input…
user3383301
  • 1,891
  • 3
  • 21
  • 49
7
votes
1 answer

Extract untranslated strings from PO file

I would like to remove all translated strings from a PO file, or generate a PO file with only the untranslated strings. Is that possible?
Pere
  • 1,647
  • 3
  • 27
  • 52
7
votes
1 answer

How to get the .po file from .pot files

I use cakePHP 2.0 and use the console tool to create one .../app/locale/default.pot . Now, I would like to get my site translated into multiple languages. I read the paragraph about internationalization in the cakephp cook book…
MUY Belgium
  • 2,330
  • 4
  • 30
  • 46
6
votes
7 answers

sed copy substring in following line

I've a .po file I need to copy msgid value into msgstr value if msgstr is empty. For example msgid "Hello" msgstr "" msgid "Dog" msgstr "Cane" Should become msgid "Hello" msgstr "Hello" msgid "Dog" msgstr "Cane" Currently, for testing purpose,…
assistbss
  • 527
  • 7
  • 25
6
votes
2 answers

.Net Library to parse PO files

I wanted to create a translator for PO files but I thought that it's better to ask whether there is a library for .Net to parse .PO files or not. Thanks.
Alireza Noori
  • 14,961
  • 30
  • 95
  • 179
6
votes
1 answer

What is the best way to localize Markdown files in Weblate?

So I have been trialling Weblate using Docker, and pointing it at a Git repo with some .md files I want to localize. I believe a good way of doing this is to use po4a to first convert the .md (basically text) files to a Gettext .pot file then import…
Dominic Porter
  • 103
  • 1
  • 8
6
votes
3 answers

How to use po/pot files with php?

I have a .po and a .mo file in a folder whose address is /locale/nld_nld/LC_MESSAGES/. Both the files' names are messages. I've been trying to use the following code: try.php: the…
Rajat Sharma
  • 61
  • 1
  • 2
6
votes
2 answers

Django blocktrans with variable

I have a template, in which I want to translate a string. {% blocktrans with "www.mywebsite.com" as website_name %}footer-slogan{{ website_name }}{% endblocktrans %} I've generated my po file, in which I've translated the string as follow : msgid…
Fab
  • 97
  • 2
  • 11
6
votes
0 answers

How to merge two .po files?

I have 2 problems to merge 2 .po files. I have 1 .po file(trans.po) for my applications localization, and another one (transNew.po) I produced recently. I need to merge them. But I when I run the following command, I will always get the same…
cHiWa
  • 383
  • 1
  • 3
  • 14
5
votes
2 answers

LLDB po complain error: expression failed to parse: error: Couldn't realize type of self

It's a iOS application using cocoapods. Xcode 14 and Xcode 13.4.1 behavior same. I am using a static lib. With Xcode 14 new lldb cmd swift-healthcheck, print "SwiftASTContextForExpressions::LoadOneModule() -- Missing Swift module or Clang module…
Jules
  • 631
  • 6
  • 14
5
votes
2 answers

How to convert .po to .mo files on mac?

I have tried using poedit 1.4.6>save as, but .mo is not an option.
Himmators
  • 14,278
  • 36
  • 132
  • 223
5
votes
1 answer

How to update an existing .po file with a newly generated .pot file?

Cake version is 2.x. I have extracted all the texts inside __ function with ./Console/cake i18n extract command, moved the default.pot file into app/Locale/[iso3]/LC_MESSAGES/default.po and translated it to corresponding language. Everything is…
dav
  • 8,931
  • 15
  • 76
  • 140
5
votes
1 answer

What does it mean those translations marked as #~ in the django `.po` file?

I'm using django i18n and I've been executed makemessages several times to include new phrases I marked for translation while I'm developing my app. Recently, I realised there are some translation (not many) marked as: #~ msgid "Location:" #~ msgstr…
kiril
  • 4,914
  • 1
  • 30
  • 40
1
2
3
17 18