r81190 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81189‎ | r81190 | r81191 >
Date:15:45, 29 January 2011
Author:happy-melon
Status:ok (Comments)
Tags:
Comment:
Follow-up r81074: succumb, though it breaks my heart to do so (:P), to American linguistic imperialism...
Modified paths:
  • /trunk/extensions/ParserFunctions/Convert.php (modified) (history)
  • /trunk/extensions/ParserFunctions/ParserFunctions.i18n.magic.php (modified) (history)
  • /trunk/extensions/ParserFunctions/ParserFunctions.i18n.php (modified) (history)
  • /trunk/extensions/ParserFunctions/convertTests.txt (modified) (history)

Diff [purge]

Index: trunk/extensions/ParserFunctions/convertTests.txt
@@ -3,7 +3,7 @@
44 !! input
55 {{#convert: 10 m | km }}
66 !!result
7 -<p>0.01 kilometres
 7+<p>0.01 kilometers
88 </p>
99 !! end
1010
@@ -19,14 +19,14 @@
2020 *{{#convert: 10.0E2 km | m }}
2121 *{{#convert: 10.0E2.5 km | m }}
2222 !! result
23 -<ul><li>0.01 kilometres
24 -</li><li>0.01 kilometres
25 -</li><li>10,000 metres
26 -</li><li>10,000- metres
27 -</li><li>1,000,000 metres
28 -</li><li>100 metres
29 -</li><li>1,000,000 metres
30 -</li><li>1,000,000.5,000 metres
 23+<ul><li>0.01 kilometers
 24+</li><li>0.01 kilometers
 25+</li><li>10,000 meters
 26+</li><li>10,000- meters
 27+</li><li>1,000,000 meters
 28+</li><li>100 meters
 29+</li><li>1,000,000 meters
 30+</li><li>1,000,000.5,000 meters
3131 </li></ul>
3232
3333 !! end
@@ -46,17 +46,17 @@
4747 *{{#convert: 19 m | km }}
4848 *{{#convert: 20 m | km }}
4949 !! result
50 -<ul><li>0.01 kilometres
51 -</li><li>0.011 kilometres
52 -</li><li>0.012 kilometres
53 -</li><li>0.013 kilometres
54 -</li><li>0.014 kilometres
55 -</li><li>0.015 kilometres
56 -</li><li>0.016 kilometres
57 -</li><li>0.017 kilometres
58 -</li><li>0.018 kilometres
59 -</li><li>0.019 kilometres
60 -</li><li>0.02 kilometres
 50+<ul><li>0.01 kilometers
 51+</li><li>0.011 kilometers
 52+</li><li>0.012 kilometers
 53+</li><li>0.013 kilometers
 54+</li><li>0.014 kilometers
 55+</li><li>0.015 kilometers
 56+</li><li>0.016 kilometers
 57+</li><li>0.017 kilometers
 58+</li><li>0.018 kilometers
 59+</li><li>0.019 kilometers
 60+</li><li>0.02 kilometers
6161 </li></ul>
6262
6363 !! end
@@ -73,14 +73,14 @@
7474 *{{#convert: 10.6 m | km }}
7575 *{{#convert: 10.7 m | km }}
7676 !! result
77 -<ul><li>0.0100 kilometres
78 -</li><li>0.0101 kilometres
79 -</li><li>0.0102 kilometres
80 -</li><li>0.0103 kilometres
81 -</li><li>0.0104 kilometres
82 -</li><li>0.0105 kilometres
83 -</li><li>0.0106 kilometres
84 -</li><li>0.0107 kilometres
 77+<ul><li>0.0100 kilometers
 78+</li><li>0.0101 kilometers
 79+</li><li>0.0102 kilometers
 80+</li><li>0.0103 kilometers
 81+</li><li>0.0104 kilometers
 82+</li><li>0.0105 kilometers
 83+</li><li>0.0106 kilometers
 84+</li><li>0.0107 kilometers
8585 </li></ul>
8686
8787 !! end
@@ -90,7 +90,7 @@
9191 !! input
9292 {{#convert: 25, 26, 27, 28, 29, and 30 km }}
9393 !! result
94 -<p>25,000, 26,000, 27,000, 28,000, 29,000, and 30,000 metres
 94+<p>25,000, 26,000, 27,000, 28,000, 29,000, and 30,000 meters
9595 </p>
9696 !! end
9797
@@ -99,7 +99,7 @@
100100 !! input
101101 {{#convert: 25, 26, 27, 28, 29, and 30 miles }}
102102 !! result
103 -<p>40,000, 42,000, 43,000, 45,000, 47,000, and 50,000 metres
 103+<p>40,000, 42,000, 43,000, 45,000, 47,000, and 50,000 meters
104104 </p>
105105 !! end
106106
@@ -108,7 +108,7 @@
109109 !! input
110110 {{#convert:35000, 35E3, 35.0E3, 350E2, 3.500E4, 35000E0, 350000E-1 m | km }}
111111 !! result
112 -<p>35, 35, 35.0, 35, 35.00, 35, 35 kilometres
 112+<p>35, 35, 35.0, 35, 35.00, 35, 35 kilometers
113113 </p>
114114 !! end
115115
@@ -120,10 +120,10 @@
121121 *{{#convert: 25 | #sourceunit = km | #sourceunit = mm }}
122122 *{{#convert: 25 | #sourceunit = km | cm }}
123123 !! result
124 -<ul><li>25,000 metres
125 -</li><li>25,000 metres
126 -</li><li>0.025 metres
127 -</li><li>2,500,000 centimetres
 124+<ul><li>25,000 meters
 125+</li><li>25,000 meters
 126+</li><li>0.025 meters
 127+</li><li>2,500,000 centimeters
128128 </li></ul>
129129
130130 !! end
@@ -142,16 +142,16 @@
143143 *{{#convert: 1 mi | #sf = 5 }}
144144 *{{#convert: 1 mi | #sf = -8 }}
145145 !! result
146 -<ul><li>1,609 metres
147 -</li><li>1,609.3 metres
148 -</li><li>1,600 metres
149 -</li><li>1,609.344 metres
150 -</li><li>0 metres
151 -</li><li>2,000 metres
152 -</li><li>2,000 metres
153 -</li><li>1,610 metres
154 -</li><li>1,609.3 metres
155 -</li><li>2,000 metres
 146+<ul><li>1,609 meters
 147+</li><li>1,609.3 meters
 148+</li><li>1,600 meters
 149+</li><li>1,609.344 meters
 150+</li><li>0 meters
 151+</li><li>2,000 meters
 152+</li><li>2,000 meters
 153+</li><li>1,610 meters
 154+</li><li>1,609.3 meters
 155+</li><li>2,000 meters
156156 </li></ul>
157157
158158 !! end
@@ -186,8 +186,26 @@
187187 *{{#convert: 25 km | #targetunit = #sourceunit }}
188188 *{{#convert: 25 km | #sourceunit = #targetunit }}
189189 !! result
190 -<ul><li>25 kilometres
191 -</li><li>25 kilometres
 190+<ul><li>25 kilometers
 191+</li><li>25 kilometers
192192 </li></ul>
193193
194194 !! end
 195+
 196+!! test
 197+#language
 198+!! input
 199+*{{#convert: 10 m | km | #language=en-gb }}
 200+*{{#convert: 10m | km | #language = en-gb }}
 201+*{{#convert: 10 km | m |#language=en-gb}}
 202+*{{#convert: 10 pa | mmhg | #language = en-gb }}
 203+*{{#convert: 10 pa | mmhg | #language = /../evil/attack }}
 204+!! result
 205+<ul><li>0.01 kilometres
 206+</li><li>0.01 kilometres
 207+</li><li>10,000 metres
 208+</li><li>0.1 milimetres of mercury
 209+</li><li>0.1 milimeters of mercury
 210+</li></ul>
 211+
 212+!! end
Index: trunk/extensions/ParserFunctions/Convert.php
@@ -38,6 +38,10 @@
3939 protected $decimalPlaces;
4040 protected $significantFigures;
4141
 42+ # What language to display the units in
 43+ # @var Language
 44+ protected $language;
 45+
4246 # The last value converted, which will be used for PLURAL evaluation
4347 protected $lastValue;
4448
@@ -56,6 +60,8 @@
5761 = $this->significantFigures
5862 = $this->decimalPlaces
5963 = null;
 64+
 65+ $this->language = true; # prompts wfGetLangObj() to use $wgContLang
6066 }
6167
6268 /**
@@ -83,6 +89,7 @@
8490 'significantfigures' => null,
8591 'abbreviate' => null,
8692 'rawsuffix' => null,
 93+ 'language' => null,
8794 );
8895 if( !is_object( $magicWords ) ){
8996 foreach( $magicWords as $key => &$val ){
@@ -120,6 +127,10 @@
121128 if( intval( $parts[1] ) > 0 ){
122129 $this->significantFigures = intval( $parts[1] );
123130 }
 131+
 132+ } elseif( $magicWords->language->matchStartAndRemove( $parts[0] ) ) {
 133+ # if this is an invalid code we'll get $wgContLang back
 134+ $this->language = Language::factory( $parts[1] );
124135 }
125136
126137 } elseif( $magicWords->linkunit->matchStartAndRemove( $parts[0] ) ) {
@@ -187,7 +198,8 @@
188199 $unit = $this->targetUnit->getText(
189200 $this->lastValue,
190201 $this->link,
191 - $this->abbreviate
 202+ $this->abbreviate,
 203+ $this->language
192204 );
193205 return "$string $unit";
194206 }
@@ -689,57 +701,64 @@
690702 * Get the text of the unit
691703 * @param $value String number for PLURAL support
692704 * @param $link Bool
 705+ * @param $language Language
693706 * @return String
694707 */
695 - public function getText( $value, $link=false, $abbreviate=false ){
 708+ public function getText( $value, $link=false, $abbreviate=false, $language=null ){
696709 global $wgContLang;
697710 $value = $wgContLang->formatNum( $value );
698 - $abbr = $abbreviate ? '-abbr' : '';
699711
700712 if( !is_array( $this->unitName ) ){
701 - $msg = "pfunc-convert-unit-{$this->dimension->getName()}-{$this->unitName}";
702 - $msgText = wfMsgExt( "$msg$abbr", array( 'parsemag', 'content' ), $value );
703 - if( $link && !wfEmptyMsg( "$msg-link" ) ){
704 - $title = Title::newFromText( wfMsgForContentNoTrans( "$msg-link" ) );
705 - $msgText = "[[{$title->getFullText()}|$msgText]]";
706 - }
 713+ $msgText = $this->getTextFromMessage(
 714+ "pfunc-convert-unit-{$this->dimension->getName()}-{$this->unitName}",
 715+ $value, $link, $abbreviate, $language
 716+ );
707717
708718 } elseif( !wfEmptyMsg( "pfunc-convert-unit-{$this->dimension->getName(true)}-{$this->unitName[0]}-{$this->unitName[1]}" ) ){
709719 # A wiki has created, say, [[MediaWiki:pfunc-convert-unit-speed-metres-second]]
710720 # so they can have it display "<metres per second>" rather than
711721 # "<metres>/<second>"
712 - $msg = "pfunc-convert-unit-{$this->dimension->getName(true)}-{$this->unitName[0]}-{$this->unitName[1]}";
713 - $msgText = wfMsgExt( "$msg$abbr", array( 'parsemag', 'content' ), $value );
714 - if( $link && !wfEmptyMsg( "$msg-link" ) ){
715 - $title = Title::newFromText( wfMsgForContentNoTrans( "$msg-link" ) );
716 - if( $title instanceof Title ){
717 - $msgText = "[[{$title->getFullText()}|$msgText]]";
718 - }
719 - }
 722+ $msgText = $this->getTextFromMessage(
 723+ "pfunc-convert-unit-{$this->dimension->getName(true)}-{$this->unitName[0]}-{$this->unitName[1]}",
 724+ $value, $link, $abbreviate, $language
 725+ );
720726
721727 } else {
722728 $dimensionNames = $this->dimension->getName();
723 - $msg = "pfunc-convert-unit-{$dimensionNames[0]}-{$this->unitName[0]}";
724 - $msgText = wfMsgExt( "$msg$abbr", array( 'parsemag', 'content' ), $value );
725 - if( $link && !wfEmptyMsg( "$msg-link" ) ){
726 - $title = Title::newFromText( wfMsgForContentNoTrans( "$msg-link" ) );
727 - $msgText = "[[{$title->getFullText()}|$msgText]]";
728 - }
729 -
730 - $msg2 = "pfunc-convert-unit-{$dimensionNames[1]}-{$this->unitName[1]}";
731 - $msg2Text = wfMsgExt( "$msg2$abbr", array( 'parsemag', 'content' ), 1 ); # Singular for denominator
732 - if( $link && !wfEmptyMsg( "$msg2-link" ) ){
733 - $title = Title::newFromText( wfMsgForContentNoTrans( "$msg2-link" ) );
734 - if( $title instanceof Title ){
735 - $msg2Text = "[[{$title->getFullText()}|$msg2Text]]";
736 - }
737 - }
 729+ $msgText = $this->getTextFromMessage(
 730+ "pfunc-convert-unit-{$dimensionNames[0]}-{$this->unitName[0]}",
 731+ $value, $link, $abbreviate, $language
 732+ );
 733+ $msg2Text = $this->getTextFromMessage(
 734+ "pfunc-convert-unit-{$dimensionNames[1]}-{$this->unitName[1]}",
 735+ 1, # Singular for denominator
 736+ $link, $abbreviate, $language
 737+ );
738738 $msgText = "$msgText/$msg2Text";
739739 }
740740
741741 return $msgText;
742742 }
743743
 744+ protected function getTextFromMessage( $key, $number, $link, $abbreviate, $language ){
 745+ $abbr = $abbreviate ? '-abbr' : '';
 746+
 747+ $text = wfMsgExt(
 748+ "$key$abbr",
 749+ array( 'parsemag', 'language' => $language ),
 750+ $number
 751+ );
 752+
 753+ if( $link && !wfEmptyMsg( "$key-link" ) ){
 754+ $title = Title::newFromText( wfMsgForContentNoTrans( "$key-link" ) );
 755+ if( $title instanceof Title ){
 756+ $text = "[[{$title->getFullText()}|$text]]";
 757+ }
 758+ }
 759+
 760+ return $text;
 761+ }
 762+
744763 /**
745764 * Get the default (usually SI) unit associated with this particular dimension
746765 * @return ConvertUnit
Index: trunk/extensions/ParserFunctions/ParserFunctions.i18n.magic.php
@@ -29,6 +29,7 @@
3030 'decimalplaces' => array( 0, '#dp' ),
3131 'significantfigures' => array( 0, '#sf' ),
3232 'abbreviate' => array( 0, '#abbreviate' ),
 33+ 'language' => array( 0, '#language' ),
3334 'len' => array( 0, 'len' ),
3435 'pos' => array( 0, 'pos' ),
3536 'rpos' => array( 0, 'rpos' ),
Index: trunk/extensions/ParserFunctions/ParserFunctions.i18n.php
@@ -55,17 +55,17 @@
5656 'pfunc-convert-dimension-fuelefficiencynegative' => 'fuelefficiencynegative',
5757
5858 # LENGTH
59 - 'pfunc-convert-unit-length-gigametre' => '{{PLURAL:$1|gigametre|gigametres}}',
60 - 'pfunc-convert-unit-length-megametre' => '{{PLURAL:$1|megametre|megametres}}',
61 - 'pfunc-convert-unit-length-kilometre' => '{{PLURAL:$1|kilometre|kilometres}}',
62 - 'pfunc-convert-unit-length-hectometre' => '{{PLURAL:$1|hectometre|hectometres}}',
63 - 'pfunc-convert-unit-length-decametre' => '{{PLURAL:$1|decametre|decametres}}',
64 - 'pfunc-convert-unit-length-metre' => '{{PLURAL:$1|metre|metres}}',
65 - 'pfunc-convert-unit-length-decimetre' => '{{PLURAL:$1|decimetre|decimetres}}',
66 - 'pfunc-convert-unit-length-centimetre' => '{{PLURAL:$1|centimetre|centimetres}}',
67 - 'pfunc-convert-unit-length-millimetre' => '{{PLURAL:$1|millimetre|millimetres}}',
68 - 'pfunc-convert-unit-length-micrometre' => '{{PLURAL:$1|micrometre|micrometres}}',
69 - 'pfunc-convert-unit-length-nanometre' => '{{PLURAL:$1|nanometre|nanometres}}',
 59+ 'pfunc-convert-unit-length-gigametre' => '{{PLURAL:$1|gigameter|gigameters}}',
 60+ 'pfunc-convert-unit-length-megametre' => '{{PLURAL:$1|megameter|megameters}}',
 61+ 'pfunc-convert-unit-length-kilometre' => '{{PLURAL:$1|kilometer|kilometers}}',
 62+ 'pfunc-convert-unit-length-hectometre' => '{{PLURAL:$1|hectometer|hectometers}}',
 63+ 'pfunc-convert-unit-length-decametre' => '{{PLURAL:$1|decameter|decameters}}',
 64+ 'pfunc-convert-unit-length-metre' => '{{PLURAL:$1|meter|meters}}',
 65+ 'pfunc-convert-unit-length-decimetre' => '{{PLURAL:$1|decimeter|decimeters}}',
 66+ 'pfunc-convert-unit-length-centimetre' => '{{PLURAL:$1|centimeter|centimeters}}',
 67+ 'pfunc-convert-unit-length-millimetre' => '{{PLURAL:$1|millimeter|millimeters}}',
 68+ 'pfunc-convert-unit-length-micrometre' => '{{PLURAL:$1|micrometer|micrometers}}',
 69+ 'pfunc-convert-unit-length-nanometre' => '{{PLURAL:$1|nanometer|nanometers}}',
7070 'pfunc-convert-unit-length-angstrom' => '{{PLURAL:$1|angstrom|angstroms}}',
7171 'pfunc-convert-unit-length-mile' => '{{PLURAL:$1|mile|miles}}',
7272 'pfunc-convert-unit-length-furlong' => '{{PLURAL:$1|furlong|furlongs}}',
@@ -124,10 +124,10 @@
125125 'pfunc-convert-unit-length-astronomicalunit-abbr' => 'AU',
126126
127127 # AREA #
128 - 'pfunc-convert-unit-area-squarekilometre' => '{{PLURAL:$1|square kilometre|square kilometres}}',
129 - 'pfunc-convert-unit-area-squaremetre' => '{{PLURAL:$1|square metre|square metres}}',
130 - 'pfunc-convert-unit-area-squarecentimetre' => '{{PLURAL:$1|square centimetre|square centimetres}}',
131 - 'pfunc-convert-unit-area-squaremillimetre' => '{{PLURAL:$1|square millimetre|square millimetres}}',
 128+ 'pfunc-convert-unit-area-squarekilometre' => '{{PLURAL:$1|square kilometer|square kilometers}}',
 129+ 'pfunc-convert-unit-area-squaremetre' => '{{PLURAL:$1|square meter|square meters}}',
 130+ 'pfunc-convert-unit-area-squarecentimetre' => '{{PLURAL:$1|square centimeter|square centimeters}}',
 131+ 'pfunc-convert-unit-area-squaremillimetre' => '{{PLURAL:$1|square millimeter|square millimeters}}',
132132 'pfunc-convert-unit-area-hectare' => '{{PLURAL:$1|hectare|hectares}}',
133133 'pfunc-convert-unit-area-squaremile' => '{{PLURAL:$1|square mile|square miles}}',
134134 'pfunc-convert-unit-area-acre' => '{{PLURAL:$1|acre|acres}}',
@@ -166,13 +166,13 @@
167167 'pfunc-convert-unit-time-minute-abbr' => 'min',
168168
169169 # VOLUME #
170 - 'pfunc-convert-unit-volume-cubicmetre' => '{{PLURAL:$1|cubic metre|cubic metres}}',
171 - 'pfunc-convert-unit-volume-cubiccentimetre' => '{{PLURAL:$1|cubic centimetre|cubic centimetres}}',
172 - 'pfunc-convert-unit-volume-cubicmillimetre' => '{{PLURAL:$1|cubic millimetre|cubic millimetres}}',
173 - 'pfunc-convert-unit-volume-kilolitre' => '{{PLURAL:$1|kilolitre|kilolitres}}',
174 - 'pfunc-convert-unit-volume-litre' => '{{PLURAL:$1|litre|litres}}',
175 - 'pfunc-convert-unit-volume-centilitre' => '{{PLURAL:$1|centilitre|centilitres}}',
176 - 'pfunc-convert-unit-volume-millilitre' => '{{PLURAL:$1|millilitre|millilitres}}',
 170+ 'pfunc-convert-unit-volume-cubicmetre' => '{{PLURAL:$1|cubic meter|cubic meters}}',
 171+ 'pfunc-convert-unit-volume-cubiccentimetre' => '{{PLURAL:$1|cubic centimeter|cubic centimeters}}',
 172+ 'pfunc-convert-unit-volume-cubicmillimetre' => '{{PLURAL:$1|cubic millimeter|cubic millimeters}}',
 173+ 'pfunc-convert-unit-volume-kilolitre' => '{{PLURAL:$1|kiloliter|kiloliters}}',
 174+ 'pfunc-convert-unit-volume-litre' => '{{PLURAL:$1|liter|liters}}',
 175+ 'pfunc-convert-unit-volume-centilitre' => '{{PLURAL:$1|centiliter|centiliters}}',
 176+ 'pfunc-convert-unit-volume-millilitre' => '{{PLURAL:$1|milliliter|milliliters}}',
177177 'pfunc-convert-unit-volume-cubicyard' => '{{PLURAL:$1|cubic yard|cubic yards}}',
178178 'pfunc-convert-unit-volume-cubicfoot' => '{{PLURAL:$1|cubic foot|cubic feet}}',
179179 'pfunc-convert-unit-volume-cubicinch' => '{{PLURAL:$1|cubic inch|cubic inches}}',
@@ -245,7 +245,7 @@
246246 'pfunc-convert-unit-pressure-barye' => 'barye',
247247 'pfunc-convert-unit-pressure-atmosphere' => '{{PLURAL:$1|atmosphere|atmospheres}}',
248248 'pfunc-convert-unit-pressure-torr' => '{{PLURAL:$1|Torr|Torr}}',
249 - 'pfunc-convert-unit-pressure-mmhg' => '{{PLURAL:$1|milimetre of mercury|milimetres of mercury}}',
 249+ 'pfunc-convert-unit-pressure-mmhg' => '{{PLURAL:$1|milimeter of mercury|milimeters of mercury}}',
250250 'pfunc-convert-unit-pressure-inhg' => '{{PLURAL:$1|inch of mercury|inches of mercury}}',
251251 'pfunc-convert-unit-pressure-psi' => '{{PLURAL:$1|pound per square-inch|pounds per square-inch}}',
252252
@@ -811,6 +811,43 @@
812812 'pfunc_string_too_long' => 'Σφάλμα: ο ορμαθός υπερβαίνει $1 το όριο χαρακτήρων',
813813 );
814814
 815+/**
 816+ * British english
 817+ * @author Happy-melon
 818+ */
 819+$messages['en-gb'] = array(
 820+ # LENGTH
 821+ 'pfunc-convert-unit-length-gigametre' => '{{PLURAL:$1|gigametre|gigametres}}',
 822+ 'pfunc-convert-unit-length-megametre' => '{{PLURAL:$1|megametre|megametres}}',
 823+ 'pfunc-convert-unit-length-kilometre' => '{{PLURAL:$1|kilometre|kilometres}}',
 824+ 'pfunc-convert-unit-length-hectometre' => '{{PLURAL:$1|hectometre|hectometres}}',
 825+ 'pfunc-convert-unit-length-decametre' => '{{PLURAL:$1|decametre|decametres}}',
 826+ 'pfunc-convert-unit-length-metre' => '{{PLURAL:$1|metre|metres}}',
 827+ 'pfunc-convert-unit-length-decimetre' => '{{PLURAL:$1|decimetre|decimetres}}',
 828+ 'pfunc-convert-unit-length-centimetre' => '{{PLURAL:$1|centimetre|centimetres}}',
 829+ 'pfunc-convert-unit-length-millimetre' => '{{PLURAL:$1|millimetre|millimetres}}',
 830+ 'pfunc-convert-unit-length-micrometre' => '{{PLURAL:$1|micrometre|micrometres}}',
 831+ 'pfunc-convert-unit-length-nanometre' => '{{PLURAL:$1|nanometre|nanometres}}',
 832+
 833+ # AREA #
 834+ 'pfunc-convert-unit-area-squarekilometre' => '{{PLURAL:$1|square kilometre|square kilometres}}',
 835+ 'pfunc-convert-unit-area-squaremetre' => '{{PLURAL:$1|square metre|square metres}}',
 836+ 'pfunc-convert-unit-area-squarecentimetre' => '{{PLURAL:$1|square centimetre|square centimetres}}',
 837+ 'pfunc-convert-unit-area-squaremillimetre' => '{{PLURAL:$1|square millimetre|square millimetres}}',
 838+
 839+ # VOLUME #
 840+ 'pfunc-convert-unit-volume-cubicmetre' => '{{PLURAL:$1|cubic metre|cubic metres}}',
 841+ 'pfunc-convert-unit-volume-cubiccentimetre' => '{{PLURAL:$1|cubic centimetre|cubic centimetres}}',
 842+ 'pfunc-convert-unit-volume-cubicmillimetre' => '{{PLURAL:$1|cubic millimetre|cubic millimetres}}',
 843+ 'pfunc-convert-unit-volume-kilolitre' => '{{PLURAL:$1|kilolitre|kilolitres}}',
 844+ 'pfunc-convert-unit-volume-litre' => '{{PLURAL:$1|litre|litres}}',
 845+ 'pfunc-convert-unit-volume-centilitre' => '{{PLURAL:$1|centilitre|centilitres}}',
 846+ 'pfunc-convert-unit-volume-millilitre' => '{{PLURAL:$1|millilitre|millilitres}}',
 847+
 848+ # PRESSURE
 849+ 'pfunc-convert-unit-pressure-mmhg' => '{{PLURAL:$1|milimetre of mercury|milimetres of mercury}}',
 850+);
 851+
815852 /** Esperanto (Esperanto)
816853 * @author Yekrats
817854 */

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r81074(bug 235) parser function for conversion of units of measurement....happy-melon00:13, 27 January 2011

Comments

#Comment by Reedy (talk | contribs)   22:06, 28 June 2011

British English, fuck yeah!

Status & tagging log