mirror of
https://github.com/silentsakky/zarafa-webapp-passwd
synced 2026-07-27 10:30:56 +02:00
Merge pull request #7 from oxilion/translation
Add building of language to build.xml
This commit is contained in:
commit
7badd3b802
5 changed files with 64 additions and 9 deletions
40
build.xml
40
build.xml
|
|
@ -3,6 +3,7 @@
|
|||
<property name="root-folder" value="${basedir}/../../"/>
|
||||
<property name="tools-folder" value="${root-folder}/tools/"/>
|
||||
<property name="target-folder" value="${root-folder}/deploy/plugins"/>
|
||||
<property name="language-folder" value="${basedir}/language"/>
|
||||
|
||||
<import file="${tools-folder}/antutil.xml"/>
|
||||
|
||||
|
|
@ -42,6 +43,10 @@
|
|||
<include name="${plugin-file}"/>
|
||||
<include name="${plugin-debugfile}"/>
|
||||
</fileset>
|
||||
<!-- Delete the .mo files -->
|
||||
<fileset dir="${language-folder}">
|
||||
<include name="**/LC_MESSAGES/*.mo"/>
|
||||
</fileset>
|
||||
</delete>
|
||||
</target>
|
||||
|
||||
|
|
@ -156,8 +161,40 @@
|
|||
</exec>
|
||||
</target>
|
||||
|
||||
<!-- Generate language files -->
|
||||
<target name="language">
|
||||
<if>
|
||||
<available file="msgfmt" filepath="${env.PATH}" />
|
||||
<then>
|
||||
<foreach target="msgfmt" param="file">
|
||||
<path>
|
||||
<fileset dir="${language-folder}">
|
||||
<include name="**/LC_MESSAGES/*.po"/>
|
||||
</fileset>
|
||||
</path>
|
||||
</foreach>
|
||||
</then>
|
||||
<else>
|
||||
<echo message="WARNING: msgfmt not available, not generating *.mo files for translations"/>
|
||||
</else>
|
||||
</if>
|
||||
</target>
|
||||
|
||||
<target name="msgfmt">
|
||||
<propertyregex property="outfile" input="${file}" regexp=".*\/(language\/.*)\.po" replace="${target-folder}/${plugin-folder}/\1\.mo"/>
|
||||
<echo message="Converting ${file} to ${outfile}"/>
|
||||
<dirname property="outdir" file="${outfile}"/>
|
||||
<mkdir dir="${outdir}"/>
|
||||
<exec executable="msgfmt" failonerror="true">
|
||||
<arg value="-v"/>
|
||||
<arg value="-o"/>
|
||||
<arg value="${outfile}"/>
|
||||
<arg value="${file}"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<!-- Install all files into the target folder -->
|
||||
<target name="deploy" depends="compress, validate">
|
||||
<target name="deploy" depends="compress, validate, language">
|
||||
<mkdir dir="${target-folder}/${plugin-folder}"/>
|
||||
|
||||
<!-- Copy (and validate) manifest.xml -->
|
||||
|
|
@ -193,6 +230,7 @@
|
|||
<exclude name="build.xml"/>
|
||||
<!-- CSS is generated during build -->
|
||||
<exclude name="resources/css/*.*"/>
|
||||
<exclude name="**/LC_MESSAGES/*.po"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ Zarafa.plugins.passwd.settings.PasswdPanel = Ext.extend(Ext.form.FormPanel, {
|
|||
|
||||
Ext.applyIf(config, {
|
||||
xtype : 'zarafa.passwdpanel',
|
||||
labelWidth : 150,
|
||||
labelWidth : 200,
|
||||
defaults : {
|
||||
width : 200
|
||||
},
|
||||
|
|
@ -26,11 +26,11 @@ Zarafa.plugins.passwd.settings.PasswdPanel = Ext.extend(Ext.form.FormPanel, {
|
|||
items : [{
|
||||
xtype : 'displayfield',
|
||||
name : 'username',
|
||||
fieldLabel : 'User name'
|
||||
fieldLabel : dgettext("plugin_passwd", 'User name')
|
||||
}, {
|
||||
xtype : 'textfield',
|
||||
name : 'current_password',
|
||||
fieldLabel : 'Current password',
|
||||
fieldLabel : dgettext("plugin_passwd", 'Current password'),
|
||||
inputType : 'password',
|
||||
listeners : {
|
||||
change : this.onFieldChange,
|
||||
|
|
@ -39,7 +39,7 @@ Zarafa.plugins.passwd.settings.PasswdPanel = Ext.extend(Ext.form.FormPanel, {
|
|||
}, {
|
||||
xtype : 'textfield',
|
||||
name : 'new_password',
|
||||
fieldLabel : 'New password',
|
||||
fieldLabel : dgettext("plugin_passwd", 'New password'),
|
||||
inputType : 'password',
|
||||
listeners : {
|
||||
change : this.onFieldChange,
|
||||
|
|
@ -48,7 +48,7 @@ Zarafa.plugins.passwd.settings.PasswdPanel = Ext.extend(Ext.form.FormPanel, {
|
|||
}, {
|
||||
xtype : 'textfield',
|
||||
name : 'new_password_repeat',
|
||||
fieldLabel : 'Retype new password',
|
||||
fieldLabel : dgettext("plugin_passwd", 'Retype new password'),
|
||||
inputType : 'password',
|
||||
listeners : {
|
||||
change : this.onFieldChange,
|
||||
|
|
@ -92,4 +92,4 @@ Zarafa.plugins.passwd.settings.PasswdPanel = Ext.extend(Ext.form.FormPanel, {
|
|||
}
|
||||
});
|
||||
|
||||
Ext.reg('zarafa.passwdpanel', Zarafa.plugins.passwd.settings.PasswdPanel);
|
||||
Ext.reg('zarafa.passwdpanel', Zarafa.plugins.passwd.settings.PasswdPanel);
|
||||
|
|
|
|||
|
|
@ -76,3 +76,20 @@ msgstr "Wijzig wachtwoord"
|
|||
# js/PasswdPlugin.js:50:
|
||||
msgid "Password Change Plugin"
|
||||
msgstr "Wachtwoord wijzigen plugin"
|
||||
|
||||
# js/settings/PasswdPanel.js:29:
|
||||
msgid "User name"
|
||||
msgstr "Gebruikersnaam"
|
||||
|
||||
# js/settings/PasswdPanel.js:33:
|
||||
msgid "Current password"
|
||||
msgstr "Huidig wachtwoord"
|
||||
|
||||
# js/settings/PasswdPanel.js:42:
|
||||
msgid "New password"
|
||||
msgstr "Nieuw wachtwoord"
|
||||
|
||||
#js/settings/PasswdPanel.js:51:
|
||||
msgid "Retype new password"
|
||||
msgstr "Herhaal nieuw wachtwoord"
|
||||
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
<configfile>config.php</configfile>
|
||||
</config>
|
||||
<translations>
|
||||
<translationsdir>languages</translationsdir>
|
||||
<translationsdir>language</translationsdir>
|
||||
</translations>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class PasswdModule extends Module
|
|||
}
|
||||
|
||||
if($data['new_password'] !== $data['new_password_repeat']) {
|
||||
$errorMessage = dgettext("plugin_passwd", 'New passwords does not match.');
|
||||
$errorMessage = dgettext("plugin_passwd", 'New passwords do not match.');
|
||||
}
|
||||
|
||||
if(empty($errorMessage)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue