简体   繁体   English

我如何使用 xgettext 在 JS 中调用 xgettext 程序?

[英]how do i use xgettext to invoking the xgettext Program in JS?

how do i use xgettext to invoking the xgettext Program in window10?我如何使用 xgettext 在 window10 中调用 xgettext 程序?

i tried this code:xgettext --language=JavaScript --from-code=utf-8 --keyword=gettext --sort-output --join-existing --no-wrap -f videobanner.js -d snapmaker -o output.po .我试过这个代码:xgettext --language=JavaScript --from-code=utf-8 --keyword=gettext --sort-output --join-existing --no-wrap -f videobanner.js -d snapmaker -o输出.po i don't work!我不工作!

//videobanner.js
export default {
    bannerH1Text: gettext("Snapmaker 3-in-1 3D Printer"),
    bannerH1Text: gettext("Turn your desktop into a workshop."),
    bannerButText: ettext("Play Video"),
};

error message: no matter what the videobanner.js remain , it turns out : xgettext: error while opening "export default {" for reading: No such file or directory错误信息:无论 videobanner.js 保留什么,结果都是:xgettext: error while opening "export default {" for reading: No such file or directory

-f, --files-from=FILE -f, --files-from=FILE
get list of input files from FILE从 FILE 获取输入文件列表

If you use -f , that file is supposed to contain a list of file names that xgettext should work on.如果您使用-f ,则该文件应该包含 xgettext 应该处理的文件名列表。 Instead of that, just pass your file as a plain argument:取而代之的是,只需将您的文件作为普通参数传递:

xgettext ... videobanners.js

No -f !没有-f

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Django makemessages javascript (xgettext) - Django makemessages javascript (xgettext) 在JS中调用函数时如何使用逻辑NOT(!)运算符? - How do I use the logical NOT (!) operator when invoking functions in JS? 使用JavaScript中的xgettext提取翻译者注释(在Python模式下) - Extract translator comments with xgettext from JavaScript (in Python mode) 使用 xgettext 从 VueJS 文件中提取可翻译的字符串 - Using xgettext to extract translatable strings from VueJS file 从cli args中提取xgettext函数名称和参数的正则表达式 - Regular expression to extract xgettext function names and params from cli args 如何将google maps对象传递到我的自调用JS函数中? - How do I pass google maps object into my Self Invoking JS function? 如何在不手动调用 javascript 中的 function 的情况下使用 ajax 自动刷新页面的一部分? - How do I use ajax to auto refresh a section of page without manually invoking a function within javascript? 如何在angular.js指令中使用调用元素的文本? - How to use the invoking element's text in an angular.js directive? 如何使此Node.js程序异步? - How do I make this Node.js program asynchronous? 如何在html中使用js变量? - How do I use js variables in html?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM