问题标签 [poedit]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
433 浏览

php - PHP/WordPress 中的 Poedit 和数组

我在php中有以下数组

此外,在我的代码中,我正在执行以下操作:

现在,我如何确保 Poedit 选择要翻译的数组条目并最终回显翻译后的输出。

0 投票
3 回答
1214 浏览

cakephp - 如何使用 poedit 读取 Cakephp .ctp 文件中的 __()?

我如何使用 Poedit 读取嵌入在 __() 中的字符串。这是一个 Cakephp .ctp 文件。目前它只有在我删除一个下划线时才有效:_()。我知道如何使用控制台,但我想使用 Poedit。

0 投票
1 回答
159 浏览

wordpress - 用 wordpress/poedit 包装要翻译的代码?

目前我有这样的WP代码。我需要使它可以被 poedit 翻译。如何包装代码以使其工作?我不确定在这种情况下使用哪种方法。就像是:

这是代码。我需要翻译[“销售额”],[“销售额”]

谢谢你的帮助

0 投票
3 回答
8389 浏览

poedit - 如何在poedit中编辑原始字符串列?

您好我正在使用 poedit 编辑器,我无法编辑原始字符串列。我想在原始字符串列上编辑几个单词。提前致谢

0 投票
1 回答
88 浏览

wordpress - 在 Poedit 错误的行中

我的 php 文件中有这一行,<strong>%1$s</strong> has been successfully subscribed to %2$s但在 Poedit 中它看起来像那样,<strong>%s</strong> has been successfully subscribed to %s并且网站上的行保持未翻译。如何处理?

0 投票
1 回答
674 浏览

zend-framework2 - Zend Framework 2 - 每个模块翻译文件与全局翻译文件

我目前正在使用按模块翻译的方法。即,我分别为每个模块提供翻译文件。但是我注意到如果我们translate('x')在模块'foo'中使用并且'x'在模块'bar'中被翻译成'y',则translate('x')在模块foo中返回'y'。所以我的问题是,如果我为所有模块创建一个目录会有问题吗?因为现在更新语言文件有点烦人。

谢谢

0 投票
2 回答
570 浏览

javascript - poEdit 找不到我的占位符的翻译

我对 poEdit 很陌生,并且我成功地翻译了我的 javascript 模板和文件中 95% 的密钥。

__("key")我主要使用这种语法<%= __("key") %>

但是(总是有一个但是),由于某种原因,email占位符中的这个键

enter code here<input type='text' name=' username' placeholder='<%= _ ("email") %>'>

不使用 poEdit 解析。

我正在使用 Python 解析器;带__关键字。我错过了什么 ?

谢谢你的帮助

0 投票
3 回答
1261 浏览

php - Using Poedit to parse Twig templates in a Zend Framework 2 application

I've downloaded Poedit, and am attempting to parse my Twig templates. A few tutorials online pointed to https://github.com/umpirsky/Twig-Gettext-Extractor which I later found was referenced in a tutorial here http://aromatix.fr/?p=611 (French) with full instructions.

I got the tutorial done, installed umpirsky/twig-gettext-extractor, and when it tries to build the catalog it dies with "cannot execute program". The error popup contains this command:

At first, I noticed that the random folder that's specified as %o by the Poedit parser (e.g., poeditNoXV1p above) didn't exist. So I "hacked" twig-gettext-extractor and made it assert the existence of the path in the -o parameter. That "kinda" fixed it from the command line, but it still doesn't work from the poedit program.

Has anyone gotten this setup to work?

0 投票
2 回答
721 浏览

php - PoEdit 不解析 PHP 注释中的字符串

在 POEDIT 中,代码分析器似乎在解析代码之前删除了所有 PHP 注释。

这意味着在 PHP 注释(// 或 #)或文档块(/* */)中找不到的任何翻译都将被跳过。

是否有任何解决方案可以包含它们并使其可检测?

这是我正在尝试做的一个例子:

我希望 POEDIT 检测到“// _('No')”

然后,我可以像这样翻译“echo _(One::$enum[0]);”

感谢您的任何进一步回复:)

卡尔。

-- 编辑 -- 最后,经过 3 年,我想我找到了一个非常简单的解决方案。因为静态变量是公共的,所以我可以在课堂上填充它:

您如何看待这个解决方案?

0 投票
1 回答
366 浏览

php - Poedit 使用编辑器打开参考

我正在使用 Poedit 翻译应用程序。Poedit 提供了对源文本的引用,所以我必须打开源代码查找行等。如果我可以直接从 poedit 引用转到我的编辑器,我会非常有用,比如 Aptana 或 Notepad++。有没有办法为此目的设置 Poedit?

提前致谢!