<div dir="ltr"><div>I filed <a href="https://bugzilla.wikimedia.org/show_bug.cgi?id=55456">https://bugzilla.wikimedia.org/show_bug.cgi?id=55456</a><br><br></div>As I mention in the bug I had problems running maintenance/language/checkExtensions.php , which seemed another useful starting point.<br>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 7, 2013 at 1:20 PM, Siebrand Mazeland (WMF) <span dir="ltr"><<a href="mailto:smazeland@wikimedia.org" target="_blank">smazeland@wikimedia.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I'm very pro this conversation! Especially because it part of an item in my 2013-2014 roadmap for Language Engineering. Everything that I don't have to plan explicitly, and pops up grass root, I support. So +1!<br>
<br></div>Here's what is in the LangEng engineering roadmap document about this feature:<br>---<br><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">
<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">All Wikimedia website software features are submitted and merged through our source code management systems. Our procedures prescribe that code enters a production stage only when it is written by one person, and accepted by another person. As many of our features have textual components that need to be translated, or graphical components that may require mirroring or other features when used in Right-to-Left contexts instead of the Left-to-Right context they were developed in, we aim for a mandatory internationalization review, documented in Gerrit, in case code touches any internationalization or localization area. The L10n code review can be partially performed by an automated checker ("MediaWiki i18n linter") to provide quick feedback to developers on often observed i18n/L10n related issues, and partially requires feedback from an interactive. Mandatory review will ensure that fewer i18n and L10n issues will hit production, be it localization or an incorrect display in for example Arabic or Hebrew.</span></p>
<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">---<br><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span></p>
<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><br><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span></p>
<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><br>
</span></p><br></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Mon, Oct 7, 2013 at 9:25 PM, S Page <span dir="ltr"><<a href="mailto:spage@wikimedia.org" target="_blank">spage@wikimedia.org</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div>This git hook checks that there's a qqq message for every English message. With a little enhancement it could be generalized to most extensions.<br>
<br></div>Can someone add a test like this to Jenkins? Would it go in <br>
<<a href="https://git.wikimedia.org/blob/integration%2Fjenkins-job-builder-config.git/HEAD/mediawiki-extensions.yaml" target="_blank">https://git.wikimedia.org/blob/integration%2Fjenkins-job-builder-config.git/HEAD/mediawiki-extensions.yaml</a>><br>
</div><div>
<div><div><div><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Erik Bernhardson</b> <span dir="ltr"><<a href="mailto:ebernhardson@wikimedia.org" target="_blank">ebernhardson@wikimedia.org</a>></span><br>
Date: Wed, Oct 2, 2013 at 10:36 AM<br>Subject: [E2] i18n messages<br>To: E2 development team <<a href="mailto:e2@lists.wikimedia.org" target="_blank">e2@lists.wikimedia.org</a>><br><br><br><div dir="ltr">I've noticed a recurrence of git reviews about missing i18n documentation, to help solve these up front we could add a hook to git review (or git commit if you prefer) that checks this at a basic level for us.<div>
<br></div><div><br></div><div>In <b>.git/hooks/pre-review</b> put the following:</div><div><font face="courier new, monospace"><br></font></div><div><blockquote style="margin:0px 0px 0px 40px;border:medium none;padding:0px">
<div>
<div><font face="courier new, monospace">#!/usr/bin/env php</font></div><div><font face="courier new, monospace"><?php</font></div></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:medium none;padding:0px">
<div><div><font face="courier new, monospace">// This file must have the executable flag set to work as a hook</font></div></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:medium none;padding:0px"><div>
<div><font face="courier new, monospace">// A hooks path is always /path/to/repo/.git/hooks/hook-name</font></div>
<div><font face="courier new, monospace">$repo = dirname( dirname( dirname( realpath( $argv[0] ) ) ) );</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">include "$repo/Flow.i18n.php";</font></div>
<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">$missing = array_diff( array_keys( $messages['en'] ), array_keys( $messages['qqq'] ) );</font></div><div>
<font face="courier new, monospace">if ( $missing ) {</font></div>
<div><font face="courier new, monospace"> echo "Missing i18n messages:\n\t" . implode( "\n\t", $missing ) . "\n";</font></div><div><font face="courier new, monospace"> exit( 1 );</font></div>
<div><font face="courier new, monospace">}</font></div></div></blockquote><br></div><div>chmod +x the new file, and anytime you do a git review with missing qqq it should say:</div><div><br></div><div><blockquote style="margin:0px 0px 0px 40px;border:medium none;padding:0px">
<div><div><font face="courier new, monospace">git review</font></div><div><font face="courier new, monospace">Custom script execution failed.</font></div><div><font face="courier new, monospace">The following command failed with exit code 255</font></div>
<div><font face="courier new, monospace"> "/home/guy/Jobs/mediawiki/vagrant/mediawiki/extensions/Flow/.git/hooks/pre-review"</font></div><div><font face="courier new, monospace">-----------------------</font></div>
<div><div><font face="courier new, monospace">Missing i18n messages:</font></div><div><font face="courier new, monospace"> flow-post-action-censor-post</font></div><div><font face="courier new, monospace"><br></font></div>
</div><div><font face="courier new, monospace">-----------------------</font></div></div></blockquote><br></div><div>Relatedly, there is a new patch in gerrit to fix that missing message that made it through review.</div>
<div><br></div><div>Erik B.</div></div>
<br>_______________________________________________<br>
E2 mailing list<br>
<a href="mailto:E2@lists.wikimedia.org" target="_blank">E2@lists.wikimedia.org</a><br>
<a href="https://lists.wikimedia.org/mailman/listinfo/e2" target="_blank">https://lists.wikimedia.org/mailman/listinfo/e2</a><span><font color="#888888"><br>
<br></font></span></div><span><font color="#888888"><br><br clear="all"><br>-- <br><div dir="ltr">=S Page Features engineer<br></div>
</font></span></div></div></div></div></div>
<br></div></div>_______________________________________________<br>
Mediawiki-i18n mailing list<br>
<a href="mailto:Mediawiki-i18n@lists.wikimedia.org" target="_blank">Mediawiki-i18n@lists.wikimedia.org</a><br>
<a href="https://lists.wikimedia.org/mailman/listinfo/mediawiki-i18n" target="_blank">https://lists.wikimedia.org/mailman/listinfo/mediawiki-i18n</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br>Siebrand Mazeland<br>Product Manager Language Engineering<br>Wikimedia Foundation<br><br>M: <a href="tel:%2B31%206%2050%2069%201239" value="+31650691239" target="_blank">+31 6 50 69 1239</a><br>
Skype: siebrand<br><br>Support Free Knowledge: <a href="http://wikimediafoundation.org/wiki/Donate" target="_blank">http://wikimediafoundation.org/wiki/Donate</a>
</font></span></div>
<br>_______________________________________________<br>
Mediawiki-i18n mailing list<br>
<a href="mailto:Mediawiki-i18n@lists.wikimedia.org">Mediawiki-i18n@lists.wikimedia.org</a><br>
<a href="https://lists.wikimedia.org/mailman/listinfo/mediawiki-i18n" target="_blank">https://lists.wikimedia.org/mailman/listinfo/mediawiki-i18n</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">=S Page Features engineer<br></div>
</div></div>