msginit 이메일 주소 명령 줄 인수?
-
06-07-2019 - |
문제
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
제휴하지 않습니다 StackOverflow