Hi,
I have an old instance of the Gettext module (1.0) but where is the latest Module? Or is 1.0 the latest versionß
It is not in the extdb and I can't find it when browsing the core repository files.
Using the module and uploading the "old style" module via zip file I get this error:
msgmerge: error while opening "/tmp/c6b0828403fe82aaa3b93a7b1c3fd3826a0b77db/module_xxxxxxxxxx.pot" for reading: No such file or directory
ERROR: Failed to generate POT file - see output for explanation.
What does this message tell me?
Second question: I already have a not english translation for the old module. Which of the helper-scripts (and how has it to be used?) can "copy" the old translation?
Thanks, Flo
--
ifs-net.de -- zksoft.de
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- rgasch created topic »Using PageUtil::addVar() to load script code« 11:48 AM
- michiel responded to »password problem« 10:01 AM
- mazdev responded to »Hide "Register new account" and change template to 3 col« 07:50 AM
- mesteele101 created topic »Zikula 1.3.3 - Site Search 1.5.2 - Unable to turn off plug-ins« 07:48 AM
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Convert Module to Gettext incl. languages
-
- Rank: Developer
- Registered: May 07, 2006
- Last visit: May 28, 2010
- Posts: 124
-
- Rank: Developer
- Registered: Jun 16, 2003
- Last visit: May 29, 2010
- Posts: 1966
-
- Rank: Software Foundation
- Registered: Jul 21, 2001
- Last visit: May 31, 2010
- Posts: 624
Everything is here http://code.zikula.org/gettext - including all the shell scripts.
Drak
--
Zikula Lead Developer
Board Member of the Zikula Foundation
Follow me on twitter.com/zikuladrak -
- Rank: Developer
- Registered: May 07, 2006
- Last visit: May 28, 2010
- Posts: 124
..throws the same error:
Quote
EXTRACTING TRANSLATION STRINGS...
Done.
GENERATING POT FILE...
msgmerge: error while opening "/tmp/c8714efb6ccebac705877b362565500db3ed0192/module_contactlist.pot" for reading: No such file or directory
ERROR: Failed to generate POT file - see output for explanation.
Quote
verything is here http://code.zikula.org/gettext - including all the shell scripts.
I couldn't find documentation there what each shellscript does and which is the right to convert other languages than english into gettext
Thanks for your help, Flo
--
ifs-net.de -- zksoft.de -
- Rank: Software Foundation
- Registered: Jul 21, 2001
- Last visit: May 31, 2010
- Posts: 624
To migrate a define based module to gettext you need this:
http://code.zikula.org/gettext/browser/trunk/src/Gettext/helpers/xmigratepnmlcomponent.sh
You must run the module from inside a Zikula install and you need all the language defines in place. Use full paths.
Regards,
Drak
--
Zikula Lead Developer
Board Member of the Zikula Foundation
Follow me on twitter.com/zikuladrak -
- Rank: Developer
- Registered: May 07, 2006
- Last visit: May 28, 2010
- Posts: 124
for the usage of this script: [corelangfile] - what has to be specified here?
--
ifs-net.de -- zksoft.de -
- Rank: Software Foundation
- Registered: Jul 21, 2001
- Last visit: May 31, 2010
- Posts: 624
The path to the core language file :)
Drak
--
Zikula Lead Developer
Board Member of the Zikula Foundation
Follow me on twitter.com/zikuladrak -
- Rank: Developer
- Registered: May 07, 2006
- Last visit: May 28, 2010
- Posts: 124
Quote
The path to the core language file :)
ok then it should be corelangfilepath and not corelangfile
I'll try the script this evening, let's see if it works ;)
--
ifs-net.de -- zksoft.de -
- Rank: Software Foundation
- Registered: Jul 21, 2001
- Last visit: May 31, 2010
- Posts: 624
The scripts absolutely work as they were used time and time again for converting around 30 modules I did personally. One thing to watch for is module language defines - many people have file includes and PHP code inside the language files. All that must be removed. The language files must contain just the opening PHP syntax and then lines of define(...); with no logic inside the calls and no calls to Zikula APIs.
Make sure you use an IDE after the conversion. There are deliberate syntax breaks for certain things to force manual review. The script were designed for use with an IDE for this reason.
Regards,
Drak
--
Zikula Lead Developer
Board Member of the Zikula Foundation
Follow me on twitter.com/zikuladrak -
- Rank: Developer
- Registered: May 07, 2006
- Last visit: May 28, 2010
- Posts: 124
Quote
The scripts absolutely work
hmm. The upload function of the Gettext module does not work - If you want to try I can send you the zip file to test it for your own
I now tried to use the script to convert from pnml to gettext but it failed.
Can you give a example for the command that has to be entered to convert a module from pnml to gettext?
I try to convert the ContactList module to gettext:
Code
What's wrong? Inserting all the script's output would break the forum I think... The script seems to check all language strings from every module (or just the core?) anbd even templates.
Just a little part of the errors thrown out...
Quote
PHP Warning: require_once(/home/xxxxxxx/dummy_zikula_123/modules/ContactList/pnlang/eng): failed to open stream: Inappropriate ioctl for device in /home/xxxxxxx/dummy_zikula_123/modules/Gettext/helpers/xmigratepnmltemplate.php on line 24
Warning: require_once(/home/kunden/xxxxxxx/dummy_zikula_123/modules/ContactList/pnlang/eng): failed to open stream: Inappropriate ioctl for device in /home/kunden/xxxxxxx/dummy_zikula_123/modules/Gettext/helpers/xmigratepnmltemplate.php on line 24
PHP Fatal error: require_once(): Failed opening required '/home/xxxxxxx/dummy_zikula_123/modules/ContactList/pnlang/eng' (include_path='.:/php/includes:/usr/share/php:/usr/local/lib/php:/usr/local/php/current/lib/php') in /home/xxxxxxx/dummy_zikula_123/modules/Gettext/helpers/xmigratepnmltemplate.php on line 24
Fatal error: require_once(): Failed opening required '/home/xxxxxxx/dummy_zikula_123/modules/ContactList/pnlang/eng' (include_path='.:/php/includes:/usr/share/php:/usr/local/lib/php:/usr/local/php/current/lib/php') in /home/xxxxxxx/dummy_zikula_123/modules/Gettext/helpers/xmigratepnmltemplate.php on line 24
--
ifs-net.de -- zksoft.de -
- Rank: Team Member
- Registered: Jan 19, 2003
- Last visit: Apr 06, 2010
- Posts: 442
quan
hmm. The upload function of the Gettext module does not work
You mean the upload for generating pot files? I used this yesterday the last time, it works usually.
quan
I try to convert the ContactList module to gettext:
I guess the problem is that you need to do this inside the Zikula root folder. So please try doing a "cd dummy_zikula_123" and repeat the commands accordingly.
--
Guite | ModuleStudio -
- Rank: Developer
- Registered: May 07, 2006
- Last visit: May 28, 2010
- Posts: 124
Thanks for your reply Axel,
Quote
You mean the upload for generating pot files? I used this yesterday the last time, it works usually.
I also used it for all other modules but the Gettext module does not seem to like the Contactlist module
It's a pitty that the Gettext module doesn't throw an understandable error about the problem that seems to exist with the ContactList module.
Quote
I guess the problem is that you need to do this inside the Zikula root folder. So please try doing a "cd dummy_zikula_123" and repeat the commands accordingly.
I did the call from Zikula root, module root, gettext root - no one worked.
Maybe it would be great if drak (or someone who understands all the scripts) could explain the usage of the shellscript with a simple example.
If any user has a hint for me to solve the problem it would be nice...
Flo
Edited by quan on Aug 15, 2010 - 06:47 PM.
--
ifs-net.de -- zksoft.de -
- Rank: Software Foundation
- Registered: Jul 21, 2001
- Last visit: May 31, 2010
- Posts: 624
Florain :) I think you misundestood my original quote
Quote
The path to the core language file :)
You need to specify something like language/eng/core.php - core language file, not the path to the core language file.
Copy the languages/ folder from a Zikula 1.1.x installation. The script is not interested in Zikula 1.2 specific stuff at all, only in language define files and the old module.
cd into the module you are converting. You do not need to use sh, you do
cd ~/dummy_zikula_123/modules/ContactList
~/dummy_zikula_123/modules/gettext/helpers/xmigratepnmlcomponent.sh ~/dummy_zikula_123/modules/gettext/helpers ~/dummy_zikula_123/modules/ContactList/pnlang ~/dummy_zikula_123/languages/eng/core.php
You really must do this with an SVN checkout of the module. After conversion fire up your IDE and check the PHP files for syntax errors and you use a gui coloured diff to verify the changes especially in templates. According to how deviant the module is from API standards, you will have a varying amount of cleanup work to do.
This process is strictly for getting modules to 1.2 standards, not 1.3.
Hope this helps, let me know if you need any more support.
Drak
--
Zikula Lead Developer
Board Member of the Zikula Foundation
Follow me on twitter.com/zikuladrak -
- Rank: Software Foundation
- Registered: Jul 21, 2001
- Last visit: May 31, 2010
- Posts: 624
Last foot note, if anything goes wrong (like not to remove the said forbidden hack from language files) you need to SVN revert the entire module folder, fix, then rerun the conversion.
Drak
--
Zikula Lead Developer
Board Member of the Zikula Foundation
Follow me on twitter.com/zikuladrak -
- Rank: Registered User
- Registered: Mar 15, 2009
- Last visit: May 13, 2010
- Posts: 41
GetText could on zikula 1.3 version run?
Edited by tyroneyeh on Aug 16, 2010 - 06:02 PM.
- Moderated by:
- Support
