简体   繁体   中英

Poedit : "Source code not available error" for Html/Html5 files

I get a "Source code not available error" whenever i try to extract from source an Html5 source file.

Note that when i change its extention to.php or try to extract from any php file, the existing source code is extracted without errors. Unfortunately, that option is not viable.

Here is the Catalogue properties where the source file paths are configured:

捕获

This is the resulting error when trying to extract the source code so that it can be translated in poedit:

捕获

I solved the problem with the following steps:

  • First, Open Poedit and go to File->preferences

步骤1

  • Second, Click on the Extractors Tab and add a custom extractor with the plus sign on the bottom. Mine is already created as you see in the picture.

第2步

  • Finally add the following values to the relevant fields:

Field 1 = PHP

Field 2 = *.php; .html; .html5

Field 3 = xgettext --language=PHP --add-comments=TRANSLATORS: --force-po -o %o %C %K %F

Field 5 = %f

第 3 步

And that is it. Hopefully you can now add your html or html5 file paths in the catalogue properties and enjoy the Poedit extraction features without any problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM