View source for Module:Utilities

From Pathfinder Wiki

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in the group: Users.
  • This page has been protected from editing because it is transcluded in the following page, which is protected with the "cascading" option turned on:
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page.

local p = {}
function p.localize( strToTrans, page )
local frame = mw.getCurrentFrame()
mw.log('Utilities.localize (strToTrans, page - input): '..strToTrans..', '..tostring(page))
if ( page == nil or page == '' ) then
page = 'All'
end
mw.log('Utilities.localize (page - checked): '..page)
-- called every time ... shouldn't be a time issue needs between 40 and 80 microseconds
local langSuffix = frame:expandTemplate{ title = 'GetLangSuffix' }
mw.log('Utilities.localize (langSuffix): '..langSuffix)
-- check if input is a number
if ( tonumber(strToTrans) ~= nil ) then
mw.log('Utilities.localize: Input String is a number, return it!')
return strToTrans
end
local strFromTrans = frame:callParserFunction( '#lst', { 'Localization:'..page..langSuffix, strToTrans})
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
000
1:0
Debug console
* The module exports are available as the variable "p", including unsaved modifications. * Precede a line with "=" to evaluate it as an expression or use print(). Use mw.logObject() for tables. * Use mw.log() and mw.logObject() in module code to send messages to this console.

Template used on this page:

Return to Module:Utilities.