Commit c8c407f1 authored by Siltaar's avatar Siltaar
Browse files

idempotent behavior adding simple number entries

parent 542b60aa
......@@ -3,7 +3,7 @@
"Name: month_nb.json",
"Desc: contains the regexp tree of month number deternimation by month_nb.js",
"Author: Simon - Siltaar - Descarpentries ; simon § d12s - fr",
"Version: 4",
"Version: 4.1",
"Licence: GPLv3",
"Not tested on : Chechen, Cherokee, Hawaiian, Lezgi, Navajo, Ojibwe",
"Old English, Old High German, Old Norse",
......@@ -13,6 +13,22 @@
"Languages from : https://en.wiktionary.org/wiki/Appendix:Months_of_the_Year",
"UTF8 ranges from : http://www.regular-expressions.info/unicode.html#block"
],
"^[1-9]+$": {
"^1": {
"^1$": 1,
"^10$": 10,
"^11$": 11,
"^12$": 12
},
"^2$": 2,
"^3$": 3,
"^4$": 4,
"^5$": 5,
"^6$": 6,
"^7$": 7,
"^8$": 8,
"^9$": 9
},
"^([\\u0000-\\u024F]|[\\u0370-\\u03FF]|[\\u0530-\\u058F]|[\\u0D80-\\u0DFF]|[\\u10A0-\\u10FF])": {
"comment": "latin, greek, armenian, sinhala, georgian",
"^([ijΙygelhxğජი]|d[ij][ua]|հու)": {
......
......@@ -2,6 +2,7 @@ function unused_name (debug=true, display_months=false) {
'month_nb_json_obj_replace_token';
var tbx = document.querySelectorAll ('#mw-content-text tr');
var mns = [], lgs = [];
var total_lg_count = 0;
var cur_mns, cur_ln;
for (let i = tbx.length; i--; ) {
// console.log (tbx[i].querySelector ('td').textContent);
......@@ -48,6 +49,8 @@ function unused_name (debug=true, display_months=false) {
if (debug) console.log (str_lg);
} else {
console.log(`works with ${lgs[i]} (${i})`);
total_lg_count += 1;
}
}
console.log(`Worked for ${total_lg_count} langs`);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment