6.0.0-git
2020-12-03

[#14830] horde-translation does not work anymore on code downloaded via pear
Summary horde-translation does not work anymore on code downloaded via pear
Queue Horde Base
Queue Version 5.2.18
Type Bug
State Unconfirmed
Priority 1. Low
Owners
Requester wahnes (at) uni-koeln (dot) de
Created 2018-07-06 (881 days ago)
Due
Updated 2020-10-06 (58 days ago)
Assigned
Resolved
Milestone
Patch No

History
2020-10-06 16:13:37 jlgrancha (at) hotmail (dot) com Comment #4 Reply to this comment

[Show Quoted Text - 14 lines]
I have the identical problem. I come from this thread: 
http://horde.690.n7.nabble.com/Trouble-with-horde-translation-after-upgrade-to-Horde-5-2-18-td142947.html

Here I show you the same problem that I have encountered when trying 
to update some translations:

---------------------------
Horde translation generator
---------------------------
Loading libraries...
[   OK   ] Console_Getopt found.
[   OK   ] Console_Table found.
[   OK   ] File_Find found.

Searching gettext binaries...
[   OK   ] gettext found: /bin/gettext
[   OK   ] msgattrib found: /bin/msgattrib
[   OK   ] msgcat found: /bin/msgcat
[   OK   ] msgcomm found: /bin/msgcomm
[   OK   ] msgfmt found: /bin/msgfmt
[   OK   ] msginit found: /bin/msginit
[   OK   ] msgmerge found: /bin/msgmerge
[   OK   ] xgettext found: /bin/xgettext

[   OK   ] gettext version: 0.19.8.1

Searching Horde modules in /location/horde5/lib/..

   Fatal Error:
   Failed to open file: fopen(/location/horde5/lib/../.horde.yml): failed to
      open stream: No such file or directory
   In /usr/share/pear/Horde/Yaml.php on line 105

   1. Horde_Translation_Script->search_modules()
      /usr/bin/horde-translation:1682
   2. Horde_Translation_Script->strip_horde() /usr/bin/horde-translation:391
   3. array_map() /usr/bin/horde-translation:405
   4. Horde_Translation_Script->strip_horde()
   5. Horde_Yaml::loadFile() /usr/bin/horde-translation:407


Version Horde_Yaml:
# pear list -c horde |grep Horde_Yaml
Horde_Yaml                   2.0.7   stable

I tried to install version 2.0.5 but the problem persists.

Can anyone give us a hand in this issue?

BR


2020-10-05 23:47:10 turix13 (at) gmail (dot) com Comment #3 Reply to this comment

[Show Quoted Text - 14 lines]
2018-07-29 15:06:49 Michael Rubinsky Comment #2
Priority ⇒ 1. Low
Reply to this comment
I'd hesitate to call this a bug. These tools are meant to be used in a 
git checkout. The fact that they worked without one previously was a 
lucky accident...  leaving the ticket open though in case someone has 
some time they are looking to fill....
2018-07-06 11:01:35 wahnes (at) uni-koeln (dot) de Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Summary ⇒ horde-translation does not work anymore on code downloaded via pear
Queue ⇒ Horde Base
Milestone ⇒
Patch ⇒ No
Reply to this comment
With the changes introducted between version 5.2.17 and 5.2.18, the 
/usr/bin/horde-translation script does not work properly when trying 
to generate new MO files from PO files edited locally after a release 
of the Horde package has been downloaded via pear.

Around line 407 of horde-translation, in the strip_horde function, the 
5.2.18 version introduces a reference to Horde_Yaml which the Horde 
pear package does not depend on. With Horde_Yaml installed, the 
strip_horde function still fails as there is no ".horde.yml" file in a 
pear downloaded Horde package.

The code of the strip_horde function in the older version used 
str_replace to do the work, which worked fine in the case that there 
is no git checkout involved.

Saved Queries