سؤال

مطالبات MSGINIT لعنوان بريد إلكتروني. هل هناك طريقة لإخبار MSGinit عن عنوان البريد الإلكتروني الذي يجب استخدامه دون مطالبته مثل وسيطة سطر الأوامر؟

cat >hellogt.cxx <<EOF
// hellogt.cxx
#include <libintl.h>
#include <locale.h>
#include <iostream>
int main (){
    setlocale(LC_ALL, "");
    bindtextdomain("hellogt", "./");
    textdomain( "hellogt" );
    std::cout << gettext("hello, world!") << std::endl;
}
EOF
g++ -ohellogt hellogt.cxx
xgettext -d hellogt -o hellogt.pot hellogt.cxx
msginit -l es_MX -o spanish.po -i hellogt.pot
هل كانت مفيدة؟

المحلول

مشكلتك بسبب msginit استخدام /usr/lib64/gettext/user-email للمطالبة بالبريد الإلكتروني. إذا قمت بدلاً من ذلك بركض msginit مع ال --no-translator الخيار يجب أن يفترض أنه يتم تشغيله بشكل غير متداخل ولا يطالب بك:

msginit --no-translator -l es_MX -o spanish.po -i hellogt.pot
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top