মডিউল:স্থানাঙ্ক/খেলাঘর: সংশোধিত সংস্করণের মধ্যে পার্থক্য

বিষয়বস্তু বিয়োগ হয়েছে বিষয়বস্তু যোগ হয়েছে
Johnuniq (আলোচনা | অবদান)
insert space before direction per request
Johnuniq (আলোচনা | অবদান)
use efficient translate2bn to convert en digits to bn
১৯ নং লাইন:
 
require('Module:No globals')
local convert = require( "মডিউল:Numeral converter/খেলাঘর" ).convert;
local math_mod = require("Module:Math")
local coordinates = {};
২৬ ⟶ ২৫ নং লাইন:
local page_name = mw.uri.encode( current_page.prefixedText, 'WIKI' );
local coord_link = '//tools.wmflabs.org/geohack/geohack.php?language=bn&pagename=' .. page_name .. '&params='
 
local function translate2bn(text)
text = text:gsub('%d', {
['0'] = '০',
['1'] = '১',
['2'] = '২',
['3'] = '৩',
['4'] = '৪',
['5'] = '৫',
['6'] = '৬',
['7'] = '৭',
['8'] = '৮',
['9'] = '৯',
})
return text
end
 
local function translate2en(text)
১৩৫ ⟶ ১৫০ নং লাইন:
 
local geodmshtml = '<span class="geo-dms" title="এই অবস্থানের জন্য মানচিত্র, আকাশ থেকে তোলা চিত্র, এবং অন্যান্য তথ্য">'
.. '<span class="latitude">' .. converttranslate2bn("bn", coordinateSpec["dms-lat"]) .. '</span> '
.. '<span class="longitude">' .. converttranslate2bn("bn",coordinateSpec["dms-long"]) .. '</span>'
.. '</span>'
 
১৫৮ ⟶ ১৭৩ নং লাইন:
 
local geodechtml = '<span class="geo-dec" title="এই অবস্থানের জন্য মানচিত্র, আকাশ থেকে তোলা চিত্র, এবং অন্যান্য তথ্য">'
.. converttranslate2bn("bn", geodeclat) .. ' '
.. converttranslate2bn("bn", geodeclong)
.. '</span>'