ব্যবহারকারী:Johnuniq/sandbox: সংশোধিত সংস্করণের মধ্যে পার্থক্য
বিষয়বস্তু বিয়োগ হয়েছে বিষয়বস্তু যোগ হয়েছে
testing out-of-memory error at User:Johnuniq/Translation |
restore 10:45, 4 July 2013 mw problem test |
||
১ নং লাইন: | ১ নং লাইন: | ||
Demonstration of problem using mw.ustring.gsub via mw.loadData using [[Module:Convert/sandbox]] (that is a clickable link). |
|||
{| class="wikitable" |
|||
*<code><nowiki>{{#invoke:convert/sandbox|main|TEST}}</nowiki></code> → {{#invoke:convert/sandbox|main|TEST}} |
|||
! Type !! Convert !! Result at en !! Result at bn |
|||
*<code><nowiki>{{#invoke:convert/sandbox|main|TEST|require}}</nowiki></code> → {{#invoke:convert/sandbox|main|TEST|require}} |
|||
|- |
|||
*<code><nowiki>{{#invoke:convert/sandbox|main|TEST|load}}</nowiki></code> → {{#invoke:convert/sandbox|main|TEST|load}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|in|abbr=on}}</nowiki></code> || 2 in (51 mm) || {{convert|2|in|abbr=on}} |
|||
The "TEST" parameter causes text "১২৩৪৫৬৭৮৯০" to be used (should translate to "1234567890"). |
|||
|- |
|||
:Test 1 uses a local table (correct result). |
|||
| Length || <code><nowiki>{{convert|2|m|abbr=on}}</nowiki></code> || 2 m (6 ft 7 in) || {{convert|2|m|abbr=on}} |
|||
:Test 2 uses a table accessed with "require" (correct result). |
|||
|- |
|||
:Test 3 uses a table accessed with "loadData" (bug). |
|||
| Length || <code><nowiki>{{convert|2|mi|abbr=on}}</nowiki></code> || 2 mi (3.2 km) || {{convert|2|mi|abbr=on}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|yd|abbr=on}}</nowiki></code> || 2 yd (1.8 m) || {{convert|2|yd|abbr=on}} |
|||
The following shows the table <code>t</code> that is used in <code>mw.ustring.gsub(s, '%d', t)</code>. The tables are identical, so the gsub results should be the same. |
|||
|- |
|||
*<code><nowiki>{{#invoke:convert/sandbox|main|SHOW}}</nowiki></code> → {{#invoke:convert/sandbox|main|SHOW}} |
|||
*<code><nowiki>{{#invoke:convert/sandbox|main|SHOW|require}}</nowiki></code> → {{#invoke:convert/sandbox|main|SHOW|require}} |
|||
|- |
|||
*<code><nowiki>{{#invoke:convert/sandbox|main|SHOW|load}}</nowiki></code> → {{#invoke:convert/sandbox|main|SHOW|load}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|in|abbr=off}}</nowiki></code> || 2 inches (51 millimetres) || {{convert|2|in|abbr=off}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|m|abbr=off}}</nowiki></code> || 2 metres (6 feet 7 inches) || {{convert|2|m|abbr=off}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|mi|abbr=off}}</nowiki></code> || 2 miles (3.2 kilometres) || {{convert|2|mi|abbr=off}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|yd|abbr=off}}</nowiki></code> || 2 yards (1.8 metres) || {{convert|2|yd|abbr=off}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|nmi|abbr=off}}</nowiki></code> || 2 nautical miles (3.7 kilometres; 2.3 miles) || {{convert|2|nmi|abbr=off}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|Ym|abbr=on}}</nowiki></code> || 2 Ym (1.2<span style="margin:0 .15em 0 .25em">×</span>10<sup>21</sup> mi) || {{convert|2|Ym|abbr=on}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|Zm|abbr=on}}</nowiki></code> || 2 Zm (1.2<span style="margin:0 .15em 0 .25em">×</span>10<sup>18</sup> mi) || {{convert|2|Zm|abbr=on}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|Em|abbr=on}}</nowiki></code> || 2 Em (1.2<span style="margin:0 .15em 0 .25em">×</span>10<sup>15</sup> mi) || {{convert|2|Em|abbr=on}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|Pm|abbr=on}}</nowiki></code> || 2 Pm (1.2<span style="margin:0 .15em 0 .25em">×</span>10<sup>12</sup> mi) || {{convert|2|Pm|abbr=on}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|Tm|abbr=on}}</nowiki></code> || 2 Tm (1.2<span style="margin:0 .15em 0 .25em">×</span>10<sup>9</sup> mi) || {{convert|2|Tm|abbr=on}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|Gm|abbr=on}}</nowiki></code> || 2 Gm (1,200,000 mi) || {{convert|2|Gm|abbr=on}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|Mm|abbr=on}}</nowiki></code> || 2 Mm (1,200 mi) || {{convert|2|Mm|abbr=on}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|km|abbr=on}}</nowiki></code> || 2 km (1.2 mi) || {{convert|2|km|abbr=on}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|hm|abbr=on}}</nowiki></code> || 2 hm (660 ft) || {{convert|2|hm|abbr=on}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|dam|abbr=on}}</nowiki></code> || 2 dam (66 ft) || {{convert|2|dam|abbr=on}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|dm|abbr=on}}</nowiki></code> || 2 dm (7.9 in) || {{convert|2|dm|abbr=on}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|cm|abbr=on}}</nowiki></code> || 2 cm (0.79 in) || {{convert|2|cm|abbr=on}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|mm|abbr=on}}</nowiki></code> || 2 mm (0.079 in) || {{convert|2|mm|abbr=on}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|μm|abbr=on}}</nowiki></code> || 2 µm (7.9<span style="margin:0 .15em 0 .25em">×</span>10<sup>−5</sup> in) || {{convert|2|μm|abbr=on}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|µm|abbr=on}}</nowiki></code> || 2 µm (7.9<span style="margin:0 .15em 0 .25em">×</span>10<sup>−5</sup> in) || {{convert|2|µm|abbr=on}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|um|abbr=on}}</nowiki></code> || 2 µm (7.9<span style="margin:0 .15em 0 .25em">×</span>10<sup>−5</sup> in) || {{convert|2|um|abbr=on}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|nm|abbr=on}}</nowiki></code> || 2 nm (20 Å) || {{convert|2|nm|abbr=on}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|pm|abbr=on}}</nowiki></code> || 2 pm (0.020 Å) || {{convert|2|pm|abbr=on}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|fm|abbr=on}}</nowiki></code> || 2 fm (2.0<span style="margin:0 .15em 0 .25em">×</span>10<sup>−5</sup> Å) || {{convert|2|fm|abbr=on}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|am|abbr=on}}</nowiki></code> || 2 am (2.0<span style="margin:0 .15em 0 .25em">×</span>10<sup>−8</sup> Å) || {{convert|2|am|abbr=on}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|zm|abbr=on}}</nowiki></code> || 2 zm (2.0<span style="margin:0 .15em 0 .25em">×</span>10<sup>−11</sup> Å) || {{convert|2|zm|abbr=on}} |
|||
|- |
|||
| Length || <code><nowiki>{{convert|2|ym|abbr=on}}</nowiki></code> || 2 ym (2.0<span style="margin:0 .15em 0 .25em">×</span>10<sup>−14</sup> Å) || {{convert|2|ym|abbr=on}} |
|||
|} |
১০:৩৬, ২৪ আগস্ট ২০১৩ তারিখে সংশোধিত সংস্করণ
Demonstration of problem using mw.ustring.gsub via mw.loadData using Module:Convert/sandbox (that is a clickable link).
{{#invoke:convert/sandbox|main|TEST}}
→ স্ক্রিপ্ট ত্রুটি: ফাংশন "main" নেই।{{#invoke:convert/sandbox|main|TEST|require}}
→ স্ক্রিপ্ট ত্রুটি: ফাংশন "main" নেই।{{#invoke:convert/sandbox|main|TEST|load}}
→ স্ক্রিপ্ট ত্রুটি: ফাংশন "main" নেই।
The "TEST" parameter causes text "১২৩৪৫৬৭৮৯০" to be used (should translate to "1234567890").
- Test 1 uses a local table (correct result).
- Test 2 uses a table accessed with "require" (correct result).
- Test 3 uses a table accessed with "loadData" (bug).
The following shows the table t
that is used in mw.ustring.gsub(s, '%d', t)
. The tables are identical, so the gsub results should be the same.
{{#invoke:convert/sandbox|main|SHOW}}
→ স্ক্রিপ্ট ত্রুটি: ফাংশন "main" নেই।{{#invoke:convert/sandbox|main|SHOW|require}}
→ স্ক্রিপ্ট ত্রুটি: ফাংশন "main" নেই।{{#invoke:convert/sandbox|main|SHOW|load}}
→ স্ক্রিপ্ট ত্রুটি: ফাংশন "main" নেই।