We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

Bug 4153 - translation plugin needs to pull up data.xml files in other plugins
translation plugin needs to pull up data.xml files in other plugins
Status: RESOLVED FIXED
Product: OJS
Classification: Unclassified
Component: Plug-ins
2.3
PC All
: P5 normal
Assigned To: Alec Smecher
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-25 12:19 PDT by Juan Pablo Alperin
Modified: 2009-08-04 14:07 PDT (History)
2 users (show)

See Also:
Version Reported In:
Also Affects:


Attachments
XSL transformation to convert email templates listing to new format (1.78 KB, application/xml)
2009-03-30 14:14 PDT, Alec Smecher
Details
XSL transformation to convert email data to new format (1.80 KB, application/xml)
2009-03-30 14:17 PDT, Alec Smecher
Details
XSL transformation to convert email templates listing to new format (2.05 KB, application/xml)
2009-07-27 13:21 PDT, Alec Smecher
Details
XSL transformation to convert email data to new format (2.43 KB, application/xml)
2009-07-27 13:22 PDT, Alec Smecher
Details
Patch against PKP pre-release (51.93 KB, patch)
2009-07-29 14:50 PDT, Alec Smecher
Details | Diff
Patch against OJS pre-2.3 CVS (311.22 KB, application/x-gzip)
2009-07-29 14:55 PDT, Alec Smecher
Details
Patch against OMP pre-release (217.49 KB, patch)
2009-07-29 16:54 PDT, Alec Smecher
Details | Diff
Patch against OCS pre-2.3 CVS (514.77 KB, patch)
2009-07-30 10:35 PDT, Alec Smecher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Juan Pablo Alperin 2009-03-25 12:19:25 PDT
The PayPal and Manual Plugins, for example, have email templates and these have not been translated ever.
Comment 1 Alec Smecher 2009-03-30 14:14:14 PDT
Created attachment 1643 [details]
XSL transformation to convert email templates listing to new format
Comment 2 Alec Smecher 2009-03-30 14:17:17 PDT
Created attachment 1644 [details]
XSL transformation to convert email data to new format

To do this properly will require an overhaul of the way email XML is stored. The two attached XSL files will convert from the old storage format (generic, table-oriented) to the new email-oriented DTDs that will describe email templates.
Comment 3 Alec Smecher 2009-07-27 13:21:56 PDT
Created attachment 2199 [details]
XSL transformation to convert email templates listing to new format
Comment 4 Alec Smecher 2009-07-27 13:22:14 PDT
Created attachment 2200 [details]
XSL transformation to convert email data to new format
Comment 5 Alec Smecher 2009-07-29 14:50:34 PDT
Created attachment 2210 [details]
Patch against PKP pre-release
Comment 6 Alec Smecher 2009-07-29 14:55:09 PDT
Created attachment 2211 [details]
Patch against OJS pre-2.3 CVS
Comment 7 Alec Smecher 2009-07-29 16:54:56 PDT
Created attachment 2216 [details]
Patch against OMP pre-release
Comment 8 Alec Smecher 2009-07-30 10:35:04 PDT
Created attachment 2223 [details]
Patch against OCS pre-2.3 CVS
Comment 9 Alec Smecher 2009-07-30 10:36:28 PDT
Fixed. NEEDS TESTING!
Comment 10 James MacGregor 2009-08-04 14:03:12 PDT
(In reply to comment #9)
> Fixed. NEEDS TESTING!

Hey Alec, I'm running through a couple of transformations atm, and thought I'd make a couple of notes if other folks use the above supplied XSL against cvs: 

-- I ran into a complaint, using xsltproc, where it was trying to find dbscripts/xml/dtd/xmldata.dtd (which is referenced in the old dbscripts/xml/data/locale/da_DK/email_templates_data.xml file). The file has been removed due to abstraction work. This error can probably be suppressed if one knows what they're doing xsltproc-wise. I got around it by temporarily dumping an old xmldata.dtd file in to where xsltproc was expecting it. In any case, I don't think the DTD is necessary except to validate. 

-- The XSL file dumps the following line in the new file's header (see line 21 of emailTemplatesData.xsl): 

* emailTemplateData.xml

... which should probably be the actual name of the *resulting* file: 

* emailTemplates.xml 

IIRC we're not packaging these XSL files, so probably no biggie either way -- just some notes if others find themselves using them.
Comment 11 Alec Smecher 2009-08-04 14:07:32 PDT
Thanks, James -- I've been doing a little minor fine-tuning to the resulting XML files before committing, i.e.:

- Adding the full path of the file rather than just its filename (currently wrong as noted) to the header comment
- Making sure the DTD is in the right location (i.e. it should validate)

As you note, we're not packaging these anywhere, so I'm happy to do a little manual correction whenever we convert something.