Last modified: 2014-03-07 15:31:19 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T64096, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 62096 - Template:Birth date and age not working on pa.wikipedia
Template:Birth date and age not working on pa.wikipedia
Status: RESOLVED INVALID
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-01 08:46 UTC by Satdeep Gill
Modified: 2014-03-07 15:31 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Error (338.50 KB, image/png)
2014-03-01 08:46 UTC, Satdeep Gill
Details

Description Satdeep Gill 2014-03-01 08:46:36 UTC
Created attachment 14725 [details]
Error

Template:Birth date and age does not calculate the age on Punjabi Wikipedia. I had copied that template from English wiki, it shows the birth date but does not calculate the age and shows "Expression error: Unrecognized punctuation character "�"." 
Another Template that i copied was Death date and age works perfectly fine. Can anyone help me with this. 

I have used the template on my Sandbox in Punjabi Wiki and attached a picture of it. 

Here's the link to my Sandbox https://pa.wikipedia.org/wiki/%E0%A8%B5%E0%A8%B0%E0%A8%A4%E0%A9%8B%E0%A8%82%E0%A8%95%E0%A8%BE%E0%A8%B0:Satdeep_gill/%E0%A8%95%E0%A9%B1%E0%A8%9A%E0%A8%BE_%E0%A8%96%E0%A8%BE%E0%A8%95%E0%A8%BE

Here the link to the template https://pa.wikipedia.org/wiki/%E0%A8%AB%E0%A8%B0%E0%A8%AE%E0%A8%BE:Birth_date_and_age

Another link to template:Age
https://pa.wikipedia.org/w/index.php?title=%E0%A8%AB%E0%A8%B0%E0%A8%AE%E0%A8%BE:Age&action=edit
Comment 1 Sorawee Porncharoenwase 2014-03-01 14:25:26 UTC
This has nothing to do with bugzilla, so I will close this bug. It is the template code that is wrong. If you track the problem, you will find that the problem comes from {{age}}. The reason it fails is because {{CURRENTYEAR}} is in Punjabi language, and it can't be used in math expression. I'm wondering if there is an easy way to convert numbers in foreign language to normal numbers easily, though.
Comment 2 Siddhartha Ghai 2014-03-01 14:43:26 UTC
(In reply to Sorawee Porncharoenwase from comment #1)
> expression. I'm wondering if there is an easy way to convert numbers in
> foreign language to normal numbers easily, though.

You can create a template for this such as on bn.wp[1] or hi.wp[2]. The latter is based on a lua module.

[1]: https://bn.wikipedia.org/wiki/%E0%A6%9F%E0%A7%87%E0%A6%AE%E0%A6%AA%E0%A7%8D%E0%A6%B2%E0%A7%87%E0%A6%9F:Bn2endigits

[2]: https://hi.wikipedia.org/wiki/%E0%A4%B8%E0%A4%BE%E0%A4%81%E0%A4%9A%E0%A4%BE:%E0%A4%85%E0%A4%82%E0%A4%95_%E0%A4%AA%E0%A4%B0%E0%A4%BF%E0%A4%B5%E0%A4%B0%E0%A5%8D%E0%A4%A4%E0%A4%A8
Comment 3 Sorawee Porncharoenwase 2014-03-01 14:46:38 UTC
lua/template to normalize numbers is what I think in the first place, but it is inconvenient, as we have to use it to normalize numbers all the time.
Comment 4 Sorawee Porncharoenwase 2014-03-01 14:54:23 UTC
@Siddhartha Ghai: Use magic word {{formatnum:...|R}} is better.
Comment 5 Satdeep Gill 2014-03-01 15:27:22 UTC
Thank You Everyone, I used the Template and the Module used in Hindi Wikipedia and now everything is perfectly fine.
Comment 6 Andre Klapper 2014-03-07 15:31:19 UTC
[No bug fix in a codebase involved that was not on-wiki only, hence restoring "INVALID" status - on-wiki scripts/gadgets/templates are not handled in Bugzilla; but I'm glad that you found out how to fix it!]

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links