Skip to content

Commit

Permalink
Merge pull request #1883 from ezsystems/EZP-26835-translation-extraction
Browse files Browse the repository at this point in the history
EZP-26835 : Script to extract translations
  • Loading branch information
nicolas-bastien authored Jan 18, 2017
2 parents b461cc6 + 6433a2d commit 0a2dc57
Show file tree
Hide file tree
Showing 6 changed files with 236 additions and 163 deletions.
21 changes: 21 additions & 0 deletions bin/extract-translations.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env sh
echo 'Translation extraction';
cd ../../..;
# Extract string for default locale
echo '# Extract Kernel : EzPublishCoreBundle';
./app/console translation:extract en -v \
--dir=./vendor/ezsystems/ezpublish-kernel/eZ \
--exclude-dir=Bundle/PlatformBehatBundle \
--exclude-dir=Tests \
--exclude-dir=Features \
--exclude-dir=Publish/Core/REST/Client \
--exclude-dir=tests \
--output-dir=./vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/Resources/translations \
--enable-extractor=ez_fieldtypes \
--keep
"$@"

echo '# Clean file references';
sed -i "s|/../../../../.././vendor/ezsystems/ezpublish-kernel/|/|g" ./vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/Resources/translations/*.xlf

echo 'Translation extraction done';
144 changes: 144 additions & 0 deletions eZ/Bundle/EzPublishCoreBundle/Resources/translations/fieldtypes.en.xlf
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
<file date="2017-01-17T15:15:59Z" source-language="en" target-language="en" datatype="plaintext" original="not.available">
<header>
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/>
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>
</header>
<body>
<trans-unit id="06a34ac23ac86f7c4368380203e3dd4d91489fa0" resname="ezauthor.name">
<source>ezauthor.name</source>
<target>Authors</target>
<note>key: ezauthor.name</note>
</trans-unit>
<trans-unit id="e4ca4a21a1e442e6a1232320b2184b9e4105c73f" resname="ezbinaryfile.name">
<source>ezbinaryfile.name</source>
<target>File</target>
<note>key: ezbinaryfile.name</note>
</trans-unit>
<trans-unit id="129dd46eabe280c49a0e9d424d9cbf676621aec9" resname="ezboolean.name">
<source>ezboolean.name</source>
<target>Checkbox</target>
<note>key: ezboolean.name</note>
</trans-unit>
<trans-unit id="c4c3e3c536a09969467c7c9bb584459b47317fed" resname="ezcountry.name">
<source>ezcountry.name</source>
<target>Country</target>
<note>key: ezcountry.name</note>
</trans-unit>
<trans-unit id="3bd547a05c5a7b5ee111cc5ca608df9199f04c51" resname="ezdate.name">
<source>ezdate.name</source>
<target>Date</target>
<note>key: ezdate.name</note>
</trans-unit>
<trans-unit id="42d9e26b6e8e65856f709461b589cb7925a9f43e" resname="ezdatetime.name">
<source>ezdatetime.name</source>
<target>Date and time</target>
<note>key: ezdatetime.name</note>
</trans-unit>
<trans-unit id="d772ac8909929964906cbefd41c468c9a5d2be26" resname="ezemail.name">
<source>ezemail.name</source>
<target>E-mail address</target>
<note>key: ezemail.name</note>
</trans-unit>
<trans-unit id="0a1f3297ccc08882f5a4610f9af8fc4148c74adc" resname="ezfloat.name">
<source>ezfloat.name</source>
<target>Float</target>
<note>key: ezfloat.name</note>
</trans-unit>
<trans-unit id="fcabb29fdb097d916c88328daad461c1ea765121" resname="ezgmaplocation.name">
<source>ezgmaplocation.name</source>
<target>Map location</target>
<note>key: ezgmaplocation.name</note>
</trans-unit>
<trans-unit id="6300f890f00d9999466b4abc478857b0d29022b4" resname="ezimage.name">
<source>ezimage.name</source>
<target>Image</target>
<note>key: ezimage.name</note>
</trans-unit>
<trans-unit id="3b0f44cd332c71e78209a1a4b235bc6a1e6d374b" resname="ezinteger.name">
<source>ezinteger.name</source>
<target>Integer</target>
<note>key: ezinteger.name</note>
</trans-unit>
<trans-unit id="b55e4568224820cbddc794f6c2bd002baec6a5d0" resname="ezisbn.name">
<source>ezisbn.name</source>
<target>ISBN</target>
<note>key: ezisbn.name</note>
</trans-unit>
<trans-unit id="c564457bc5723491788fa3d0723e3716824b4a0d" resname="ezkeyword.name">
<source>ezkeyword.name</source>
<target>Keywords</target>
<note>key: ezkeyword.name</note>
</trans-unit>
<trans-unit id="fc0d2c8719e7c36f101ff6ddcbdfc804bf8f3da7" resname="ezmedia.name">
<source>ezmedia.name</source>
<target>Media</target>
<note>key: ezmedia.name</note>
</trans-unit>
<trans-unit id="feb25b24199466f077038c5e6e38209deae21471" resname="ezobjectrelation.name">
<source>ezobjectrelation.name</source>
<target>Content relation (single)</target>
<note>key: ezobjectrelation.name</note>
</trans-unit>
<trans-unit id="44d2ac9ae83f6b73fa8f61fad66a77d76d2159f0" resname="ezobjectrelationlist.name">
<source>ezobjectrelationlist.name</source>
<target>Content relations (multiple)</target>
<note>key: ezobjectrelationlist.name</note>
</trans-unit>
<trans-unit id="6ce4370c413c1a478e8e3c0a072a340584338b84" resname="ezpage.name">
<source>ezpage.name</source>
<target>Layout</target>
<note>key: ezpage.name</note>
</trans-unit>
<trans-unit id="213da4efa5baa8b47c34dc4b645df7115d07d66e" resname="ezrichtext.name">
<source>ezrichtext.name</source>
<target>Rich text</target>
<note>key: ezrichtext.name</note>
</trans-unit>
<trans-unit id="3229c3fc41a4af84f0fd1636f0678aac770359bc" resname="ezselection.name">
<source>ezselection.name</source>
<target>Selection</target>
<note>key: ezselection.name</note>
</trans-unit>
<trans-unit id="5ee0acaf0f051f903ef78be433acbfe4412e4a59" resname="ezsrrating.name">
<source>ezsrrating.name</source>
<target>Rating</target>
<note>key: ezsrrating.name</note>
</trans-unit>
<trans-unit id="d958019d9702d5e89f247c24563da97ea0205f58" resname="ezstring.name">
<source>ezstring.name</source>
<target>Text line</target>
<note>key: ezstring.name</note>
</trans-unit>
<trans-unit id="e35280b88546fdd18c84ce9c401e17cbfca56e72" resname="eztext.name">
<source>eztext.name</source>
<target>Text block</target>
<note>key: eztext.name</note>
</trans-unit>
<trans-unit id="503c2801427b2d773d020ef953413d14c17968bd" resname="eztime.name">
<source>eztime.name</source>
<target>Time</target>
<note>key: eztime.name</note>
</trans-unit>
<trans-unit id="69c0e446226061b7f2ca2b22fd4eb09e6b4e9518" resname="ezurl.name">
<source>ezurl.name</source>
<target>URL</target>
<note>key: ezurl.name</note>
</trans-unit>
<trans-unit id="0317c233c19b3c191acc92971bfb616c7fe298de" resname="ezuser.name">
<source>ezuser.name</source>
<target>User account</target>
<note>key: ezuser.name</note>
</trans-unit>
<trans-unit id="5d286b4410a54e510bfbef0f01639555" resname="ezprice.name">
<source>ezprice.name</source>
<target>Price</target>
</trans-unit>
<trans-unit id="ac326172d1684cddd1c14170e8bde9c6" resname="ezxmltext.name">
<source>ezxmltext.name</source>
<target>XML block</target>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
<file date="2016-11-29T21:22:46Z" source-language="en" target-language="en" datatype="plaintext" original="not.available">
<file date="2017-01-17T15:15:59Z" source-language="en" target-language="en" datatype="plaintext" original="not.available">
<header>
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/>
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>
</header>
<body>
<trans-unit id="e2b8dff16cf1b8ad7848630c4d7c42cc31ac5e21" resname="Enter login or email">
<source>Enter login or email</source>
<target>Enter login or email</target>
<target state="new">Enter login or email</target>
<note>key: Enter login or email</note>
<jms:reference-file line="18">/../../../../../eZ/Bundle/EzPublishCoreBundle/Resources/views/Security/login.html.twig</jms:reference-file>
<jms:reference-file line="18">/eZ/Bundle/EzPublishCoreBundle/Resources/views/Security/login.html.twig</jms:reference-file>
</trans-unit>
<trans-unit id="570591c060a999e9ab1592763c74d881b7654ee1" resname="Enter password">
<source>Enter password</source>
<target>Enter password</target>
<target state="new">Enter password</target>
<note>key: Enter password</note>
<jms:reference-file line="22">/../../../../../eZ/Bundle/EzPublishCoreBundle/Resources/views/Security/login.html.twig</jms:reference-file>
<jms:reference-file line="22">/eZ/Bundle/EzPublishCoreBundle/Resources/views/Security/login.html.twig</jms:reference-file>
</trans-unit>
<trans-unit id="4e5a2893bdcc7d239c1db72e4c4ffbe4bea73174" resname="Login">
<source>Login</source>
<target>Login</target>
<target state="new">Login</target>
<note>key: Login</note>
<jms:reference-file line="32">/../../../../../eZ/Bundle/EzPublishCoreBundle/Resources/views/Security/login.html.twig</jms:reference-file>
<jms:reference-file line="6">/../../../../../eZ/Bundle/EzPublishCoreBundle/Resources/views/Security/login.html.twig</jms:reference-file>
<jms:reference-file line="32">/eZ/Bundle/EzPublishCoreBundle/Resources/views/Security/login.html.twig</jms:reference-file>
<jms:reference-file line="6">/eZ/Bundle/EzPublishCoreBundle/Resources/views/Security/login.html.twig</jms:reference-file>
</trans-unit>
<trans-unit id="be81ab98cb9ccf753975f50fa70cd32581a821fc" resname="Password:">
<source>Password:</source>
<target>Password:</target>
<target state="new">Password:</target>
<note>key: Password:</note>
<jms:reference-file line="21">/../../../../../eZ/Bundle/EzPublishCoreBundle/Resources/views/Security/login.html.twig</jms:reference-file>
<jms:reference-file line="21">/eZ/Bundle/EzPublishCoreBundle/Resources/views/Security/login.html.twig</jms:reference-file>
</trans-unit>
<trans-unit id="17dfb031e086e3415d71f3928e6ce08d6b1c1d4d" resname="Username:">
<source>Username:</source>
<target>Username:</target>
<target state="new">Username:</target>
<note>key: Username:</note>
<jms:reference-file line="17">/../../../../../eZ/Bundle/EzPublishCoreBundle/Resources/views/Security/login.html.twig</jms:reference-file>
<jms:reference-file line="17">/eZ/Bundle/EzPublishCoreBundle/Resources/views/Security/login.html.twig</jms:reference-file>
</trans-unit>
</body>
</file>
Expand Down
Loading

0 comments on commit 0a2dc57

Please sign in to comment.