-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
php artisan l4gettext:extract returns error on latin characters #17
Comments
Could you paste your config file in here so I can try to replicate this? |
Here is my config file Thanks for your help 'tr_TR', /_* - set preferred default encoding - the default is [utf8] _/ 'default_encoding' => 'utf8', /_* - determines the text domain; this should be unique for each application - the default is [messages] _/ 'textdomain' => 'messages', /_* - the path to your mo files - this should be relative to the laravel app/ dir - do not add starting ot trailing slashes - l4gettext will automatically attempt to create the proper directory structure - the default is [locale] _/ 'path_to_mo' => 'locale', /_* - compiler settings _/ 'compiler' => array( /_* \* set the folder to scan for blade templates \* the path is relative to the /app folder and should not contain any leading ot trailing slashes - the default is [views] _/ 'input_folder' => 'views', /_* - set the folder where the compiled templates are stored - the path is relative to the /app/storage folder and should not contain and leading or trailing spaces - the default is [l4gettext] _/ 'output_folder' => 'l4gettext', /_* - determines the number of subdirectories that will be scanned for blade templates - starting from the input_folder directory - the default is [10] _/ 'levels' => 10, ), /_* - xgettext configuration _/ 'xgettext' => array( /_* \* In case your xgettext binary/executable is not called 'xgettext', you can change it here. - The default value is [xgettext] _/ 'binary' => "xgettext", /_* - In case the path to your xgettext binary is not in your PATH, you can use the following - config option to manually set it. This path will then be added to the xgettext command. - If you leave this empty, it will be assumed that the xgettext binary is in the PATH of the OS user executing the command - Example: /usr/bin * - Please do NOT add a trailing slash - The default value is [] _/ 'binary_path' => "", /_* - sets the script language for the xgettext command - you should never have to change this option - the default is [PHP] _/ 'language' => 'PHP', /_* - determines which docbloc comments are included as a remarks for translators - the default is [TRANSLATORS] _/ 'comments' => 'TRANSLATORS', /_* - force creation of .po(t) file, even if no strings were found - the default is [true] _/ 'force_po' => true, /_* - input folder where php files to be scanned are located - the path is relative to the /app folder and should not contain any leading or trailing slashes - the default is [storage/l4gettext] _/ 'input_folder' => 'storage/l4gettext', /_* - provide any additional input folders that you would like to have scanned and processed - the main 'input_folder' directove is commonly used for your (compiled) templates folder containing - the majority of your translation strings, but you can use this config option to set - additional folders, for example one containing your error messages embedded in your class file. * - this directive looks for all .php files and the folder is relative to the applications' root [/] - folder, using laravel's base_path() function. Files in these directories will NOT be compiled - before extracting the the language strings * - the default is an an empty [array()] _/ 'additional_input_folders' => array('app/libraries/core'), /_* - output folder where the po(t) file will be stored - this path is relative to the /app/storage folder and should not contain leading or trailing slashes - the default is [l4gettext] _/ 'output_folder' => 'l4gettext', /_* - set the encoding of the files - if left empty, ASCII will be used - the default is [utf8] _/ 'from_code' => 'utf8', /_* - copright holder - this will be added to the .po(t) file to ensure your texts remain your property _/ 'copyright_holder' => 'NartsWork', /_* - the package name that will be included in the .po(t) file _/ 'package_name' => 'L4gettext', /_* - the package version that will be included in the .po(t) file _/ 'package_version' => 'v1.0.0', /_* - the email address that will be included in the .po(t) file _/ 'email_address' => '[email protected]', /_* - specify the keywords used to scan the source files for strings - you can add your own shorthand/alternative keywords here which will then be scanned by xgettext - make sure the corresponding php function exists when you do - the defaults are [_, gettext, dgettext:2, dcgettext:2, ngettext:1,2, dngettext:2,3, dcngettext:2,3, _n:1,2] */ 'keywords' => array( '_', // shorthand for gettext 'gettext', // the default php gettext function 'dgettext:2', // accepts plurals, uses the second argument passed to dgettext as a translation string 'dcgettext:2', // accepts plurals, uses the second argument passed to dcgettext as a translation string 'ngettext:1,2', // accepts plurals, uses the first and second argument passed to ngettext as a translation string 'dngettext:2,3', // accepts plurals, used the second and third argument passed to dngettext as a translation string 'dcngettext:2,3', // accepts plurals, used the second and third argument passed to dcngettext as a translation string '_n:1,2', // a custom l4gettext shorthand for ngettext (supports plurals) ), ), ); ?>On 29-12-2014 16:10, netson wrote:
|
Hi, I apologize for the delay. Is it possible that you need to change the character encoding for these characters to work? Looking forward to your reply! Regards, |
[Netson\L4gettext\XgettextException]
The xgettext command could not be executed:
[1] General error
Attempted to execute the following command:
'1' '--language=PHP' '--add-comments=TRANSLATORS' '--force-po' '--output=/home/vagrant/Code/nart_framework/www/app/storage/l4gettext/messages.pot' '--from-code=utf8' '--copyright-holder=NartsWork' '--package-name=L4gettext' '--p
ackage-version=v1.0.0' '--msgid-bugs-address=[email protected]' '--escape' '--keyword=_' '--keyword=gettext' '--keyword=dgettext:2' '--keyword=dcgettext:2' '--keyword=ngettext:1,2' '--keyword=dngettext:2,3' '--keyword
=dcngettext:2,3' '--keyword=_n:1,2'
returns and error if using lating characters in a file that artisan looking for gettext strings
for ex: _('Kayıt Seç')
The text was updated successfully, but these errors were encountered: