1
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-04-13 10:34+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

#: test.php:4
msgid "Application"
msgstr ""

And when I run msgfmt just get warning that CHARSET not portable,why?

My source file is as simple as:

<?php
var_dump(function_exists('_'));
textdomain("mail");
print _("Application");exit;
yum
  • 539
  • 5
  • 9
  • 16
  • You might try explaining a bit more about what you are running, where this output is coming from, the host system, etc. – Caleb Apr 14 '11 at 07:40
  • @Caleb,the above is generated by `xgettext -o xxx file`,and when I run `msgfmt` on it,warning is got.I'm on linux. – yum Apr 14 '11 at 09:24
  • 1
    I found this question by searching for the email address `LL@li.org` on a search engine... In fact it is just default data that can be replaced with yours, it was also generated with wp-cli tool for WordPress and the command `wp i18n make-pot`. But I am curious why the email address `LL@li.org`. Edit: I searched for the WHOIS and it looks like the domain is registered by `Linux International`. For your question about the charset, it is wrong because you used `charset=CHARSET` instead of something like `charset=UTF-8`. – baptx Jul 19 '19 at 10:53

1 Answers1

0

Perhaps your input file isn't in the expected format and it is just passing data through? Try posting your source file (or at least some of it) to pastebin or somewhere for us to examine.

Caleb
  • 11,583
  • 4
  • 35
  • 49
  • I've updated with the source file:) – yum Apr 14 '11 at 09:39
  • Um...ok but that's definitly not the whole chain of code. What is the `_` function, what does it output, and where does gettext come into the mix? It sounds like we need to see the output that get's passed to xgettext, not some upper level controller code. – Caleb Apr 14 '11 at 09:54
  • I've updated with the complete content of .po generated by `xgettext source-file` command. – yum Apr 14 '11 at 10:07