Lang: Fix misspelling of `hijri` [#837]

master
gnosygnu 3 years ago
parent 559503786b
commit 7e53c8462d

@ -1,6 +1,6 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012-2017 gnosygnu@gmail.com
Copyright (C) 2012-2021 gnosygnu@gmail.com
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
or alternatively under the terms of the Apache License Version 2.0.
@ -13,10 +13,20 @@ The terms of each license can be found in the source code repository:
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
package gplx.xowa.xtns.pfuncs.times; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.pfuncs.*;
import gplx.core.btries.*;
import gplx.xowa.langs.*; import gplx.xowa.langs.msgs.*;
import gplx.xowa.parsers.*;
package gplx.xowa.xtns.pfuncs.times;
import gplx.Bool_;
import gplx.Byte_;
import gplx.Byte_ascii;
import gplx.DateAdp_;
import gplx.Int_;
import gplx.List_adp;
import gplx.String_;
import gplx.core.btries.Btrie_fast_mgr;
import gplx.core.btries.Btrie_rv;
import gplx.xowa.langs.msgs.Xol_msg_itm_;
import gplx.xowa.parsers.Xop_ctx;
public class Pft_fmt_itm_ {
public static final int
Tid_seg_int = 1
@ -48,10 +58,10 @@ public class Pft_fmt_itm_ {
, Tid_iranian_month_idx = 27
, Tid_iranian_day_idx = 28
, Tid_iranian_month_name = 29
, Tid_hijiri_year_idx = 30
, Tid_hijiri_month_idx = 31
, Tid_hijiri_day_idx = 32
, Tid_hijiri_month_name = 33
, Tid_hijri_year_idx = 30
, Tid_hijri_month_idx = 31
, Tid_hijri_day_idx = 32
, Tid_hijri_month_name = 33
, Tid_timezone_id_full = 35
, Tid_timezone_id_abrv = 36
, Tid_timezone_offset_4 = 37
@ -107,10 +117,10 @@ public class Pft_fmt_itm_ {
, Iranian_month_idx = new Pft_fmt_itm_iranian_month_idx()
, Iranian_day_idx = new Pft_fmt_itm_iranian_day_idx()
, Iranian_month_name = new Pft_fmt_itm_iranian_month_name()
, Hijiri_year_idx = new Pft_fmt_itm_hijiri_year_idx()
, Hijiri_month_idx = new Pft_fmt_itm_hijiri_month_idx()
, Hijiri_day_idx = new Pft_fmt_itm_hijiri_day_idx()
, Hijiri_month_name = new Pft_fmt_itm_hijiri_month_name()
, hijri_year_idx = new Pft_fmt_itm_hijri_year_idx()
, hijri_month_idx = new Pft_fmt_itm_hijri_month_idx()
, hijri_day_idx = new Pft_fmt_itm_hijri_day_idx()
, hijri_month_name = new Pft_fmt_itm_hijri_month_name()
, Timezone_id_full = new Pft_fmt_itm_timezone_id(Bool_.N)
, Timezone_id_abrv = new Pft_fmt_itm_timezone_id(Bool_.Y)
, Timezone_offset_4 = new Pft_fmt_itm_timezone_offset_4(Bool_.N)
@ -167,10 +177,10 @@ public class Pft_fmt_itm_ {
.Add("xiF" , Pft_fmt_itm_.Iranian_month_name)
.Add("xin" , Pft_fmt_itm_.Iranian_month_idx)
.Add("xiY" , Pft_fmt_itm_.Iranian_year_idx)
.Add("xmj" , Pft_fmt_itm_.Hijiri_day_idx)
.Add("xmF" , Pft_fmt_itm_.Hijiri_month_name)
.Add("xmn" , Pft_fmt_itm_.Hijiri_month_idx)
.Add("xmY" , Pft_fmt_itm_.Hijiri_year_idx)
.Add("xmj" , Pft_fmt_itm_.hijri_day_idx)
.Add("xmF" , Pft_fmt_itm_.hijri_month_name)
.Add("xmn" , Pft_fmt_itm_.hijri_month_idx)
.Add("xmY" , Pft_fmt_itm_.hijri_year_idx)
// TODO_OLD: space; "
;

@ -1,6 +1,6 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012-2017 gnosygnu@gmail.com
Copyright (C) 2012-2021 gnosygnu@gmail.com
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
or alternatively under the terms of the Apache License Version 2.0.
@ -13,8 +13,13 @@ The terms of each license can be found in the source code repository:
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
package gplx.xowa.xtns.pfuncs.times; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.pfuncs.*;
import gplx.xowa.langs.*;
package gplx.xowa.xtns.pfuncs.times;
import gplx.Bry_bfr;
import gplx.DateAdp;
import gplx.xowa.Xowe_wiki;
import gplx.xowa.langs.Xol_lang_itm;
class Pft_fmt_itm_roman implements Pft_fmt_itm {
public int TypeId() {return Pft_fmt_itm_.Tid_roman;}
public void Fmt(Bry_bfr bfr, Xowe_wiki wiki, Xol_lang_itm lang, DateAdp date, Pft_func_formatdate_bldr bldr) {
@ -120,30 +125,30 @@ class Pft_fmt_itm_iranian_month_name implements Pft_fmt_itm {
bfr.Add(Pft_fmt_itm_iranian.Get_month_name(wiki, date));
}
}
class Pft_fmt_itm_hijiri_year_idx implements Pft_fmt_itm {
public int TypeId() {return Pft_fmt_itm_.Tid_hijiri_year_idx;}
class Pft_fmt_itm_hijri_year_idx implements Pft_fmt_itm {
public int TypeId() {return Pft_fmt_itm_.Tid_hijri_year_idx;}
public void Fmt(Bry_bfr bfr, Xowe_wiki wiki, Xol_lang_itm lang, DateAdp date, Pft_func_formatdate_bldr bldr) {
int[] seg_ary = Pft_fmt_itm_hijiri.Calc_date(date);
bfr.Add_int_variable(seg_ary[Pft_fmt_itm_hijiri.Rslt__year]);
int[] seg_ary = Pft_fmt_itm_hijri.Calc_date(date);
bfr.Add_int_variable(seg_ary[Pft_fmt_itm_hijri.Rslt__year]);
}
}
class Pft_fmt_itm_hijiri_month_idx implements Pft_fmt_itm {
public int TypeId() {return Pft_fmt_itm_.Tid_hijiri_month_idx;}
class Pft_fmt_itm_hijri_month_idx implements Pft_fmt_itm {
public int TypeId() {return Pft_fmt_itm_.Tid_hijri_month_idx;}
public void Fmt(Bry_bfr bfr, Xowe_wiki wiki, Xol_lang_itm lang, DateAdp date, Pft_func_formatdate_bldr bldr) {
int[] seg_ary = Pft_fmt_itm_hijiri.Calc_date(date);
bfr.Add_int_variable(seg_ary[Pft_fmt_itm_hijiri.Rslt__month]);
int[] seg_ary = Pft_fmt_itm_hijri.Calc_date(date);
bfr.Add_int_variable(seg_ary[Pft_fmt_itm_hijri.Rslt__month]);
}
}
class Pft_fmt_itm_hijiri_day_idx implements Pft_fmt_itm {
public int TypeId() {return Pft_fmt_itm_.Tid_hijiri_day_idx;}
class Pft_fmt_itm_hijri_day_idx implements Pft_fmt_itm {
public int TypeId() {return Pft_fmt_itm_.Tid_hijri_day_idx;}
public void Fmt(Bry_bfr bfr, Xowe_wiki wiki, Xol_lang_itm lang, DateAdp date, Pft_func_formatdate_bldr bldr) {
int[] seg_ary = Pft_fmt_itm_hijiri.Calc_date(date);
bfr.Add_int_variable(seg_ary[Pft_fmt_itm_hijiri.Rslt__day]);
int[] seg_ary = Pft_fmt_itm_hijri.Calc_date(date);
bfr.Add_int_variable(seg_ary[Pft_fmt_itm_hijri.Rslt__day]);
}
}
class Pft_fmt_itm_hijiri_month_name implements Pft_fmt_itm {
public int TypeId() {return Pft_fmt_itm_.Tid_hijiri_month_name;}
class Pft_fmt_itm_hijri_month_name implements Pft_fmt_itm {
public int TypeId() {return Pft_fmt_itm_.Tid_hijri_month_name;}
public void Fmt(Bry_bfr bfr, Xowe_wiki wiki, Xol_lang_itm lang, DateAdp date, Pft_func_formatdate_bldr bldr) {
bfr.Add(Pft_fmt_itm_hijiri.Get_month_name(wiki, date));
bfr.Add(Pft_fmt_itm_hijri.Get_month_name(wiki, date));
}
}

@ -1,6 +1,6 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012-2017 gnosygnu@gmail.com
Copyright (C) 2012-2021 gnosygnu@gmail.com
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
or alternatively under the terms of the Apache License Version 2.0.
@ -13,8 +13,14 @@ The terms of each license can be found in the source code repository:
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
package gplx.xowa.xtns.pfuncs.times; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.pfuncs.*;
class Pft_fmt_itm_hijiri {
package gplx.xowa.xtns.pfuncs.times;
import gplx.Bry_;
import gplx.DateAdp;
import gplx.List_adp_;
import gplx.xowa.Xowe_wiki;
class Pft_fmt_itm_hijri {
public static int[] Calc_date(DateAdp date) {
int[] rv = new int[3]; // MEM:cache
Calc_date(rv, date.Year(), date.Month(), date.Day());
@ -58,10 +64,10 @@ class Pft_fmt_itm_hijiri {
return wiki.Msg_mgr().Val_by_key_obj(msg_key);
}
private static final byte[][] Month_names = new byte[][]
{ Bry_.new_a7("hijiri-calendar-m1"), Bry_.new_a7("hijiri-calendar-m2"), Bry_.new_a7("hijiri-calendar-m3")
, Bry_.new_a7("hijiri-calendar-m4"), Bry_.new_a7("hijiri-calendar-m5"), Bry_.new_a7("hijiri-calendar-m6")
, Bry_.new_a7("hijiri-calendar-m7"), Bry_.new_a7("hijiri-calendar-m8"), Bry_.new_a7("hijiri-calendar-m9")
, Bry_.new_a7("hijiri-calendar-m10"), Bry_.new_a7("hijiri-calendar-m11"), Bry_.new_a7("hijiri-calendar-m12")
{ Bry_.new_a7("hijri-calendar-m1"), Bry_.new_a7("hijri-calendar-m2"), Bry_.new_a7("hijri-calendar-m3")
, Bry_.new_a7("hijri-calendar-m4"), Bry_.new_a7("hijri-calendar-m5"), Bry_.new_a7("hijri-calendar-m6")
, Bry_.new_a7("hijri-calendar-m7"), Bry_.new_a7("hijri-calendar-m8"), Bry_.new_a7("hijri-calendar-m9")
, Bry_.new_a7("hijri-calendar-m10"), Bry_.new_a7("hijri-calendar-m11"), Bry_.new_a7("hijri-calendar-m12")
};
public static final int
Rslt__year = 0

@ -1,6 +1,6 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012-2017 gnosygnu@gmail.com
Copyright (C) 2012-2021 gnosygnu@gmail.com
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
or alternatively under the terms of the Apache License Version 2.0.
@ -13,8 +13,12 @@ The terms of each license can be found in the source code repository:
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
package gplx.xowa.xtns.pfuncs.times; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.pfuncs.*;
import org.junit.*;
package gplx.xowa.xtns.pfuncs.times;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class Pft_func_time__other__tst {
@Before public void init() {fxt.Clear();} private Pft_func_time_foreign_fxt fxt = new Pft_func_time_foreign_fxt();
@After public void term() {fxt.Term();}
@ -24,10 +28,10 @@ public class Pft_func_time__other__tst {
@Test public void Iranian__month_idx() {fxt.Test_parse("{{#time:xin|2012-01-02}}" , "10");}
@Test public void Iranian__day_idx() {fxt.Test_parse("{{#time:xij|2012-01-02}}" , "12");}
@Test public void Iranian__month_name() {fxt.Init_msg("iranian-calendar-m10" , "Dey"); fxt.Test_parse("{{#time:xiF|2012-01-02}}" , "Dey");}
@Test public void Hijiri__year_idx() {fxt.Test_parse("{{#time:xmY|2012-01-02}}" , "1433");}
@Test public void Hijiri__month_idx() {fxt.Test_parse("{{#time:xmn|2012-01-02}}" , "2");}
@Test public void Hijiri__day_idx() {fxt.Test_parse("{{#time:xmj|2012-01-02}}" , "7");}
@Test public void Hijiri__month_name() {fxt.Init_msg("hijiri-calendar-m2" , "Safar"); fxt.Test_parse("{{#time:xmF|2012-01-02}}" , "Safar");}
@Test public void hijri__year_idx() {fxt.Test_parse("{{#time:xmY|2012-01-02}}" , "1433");}
@Test public void hijri__month_idx() {fxt.Test_parse("{{#time:xmn|2012-01-02}}" , "2");}
@Test public void hijri__day_idx() {fxt.Test_parse("{{#time:xmj|2012-01-02}}" , "7");}
@Test public void hijri__month_name() {fxt.Init_msg("hijri-calendar-m2" , "Safar"); fxt.Test_parse("{{#time:xmF|2012-01-02}}" , "Safar");}
@Test public void Roman__year() {fxt.Test_parse("{{#time:xrY|2012}}" , "MMXII");}
@Test public void Roman__various() {
fxt.Test_Roman( 1, "I");

Loading…
Cancel
Save