File tree Expand file tree Collapse file tree
src/undate/converters/grammars Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,4 +88,19 @@ pip install -e ".[docs]"
8888sphinx-build docs docs/_build
8989```
9090
91- HTML documentation will be generated in ` docs/_build/html `
91+ HTML documentation will be generated in ` docs/_build/html `
92+
93+
94+ ### Regenerating multilingual Gregorian month name parse file
95+
96+ The Gregorian Lark parser includes a script-generated file, which
97+ populates month names based on a list of language codes using the Babel
98+ library. To regenerate, run the script with hatch (which should
99+ be installed globally)::
100+
101+ hatch run codegen:generate
102+
103+ When the ` .lark ` file is modified by the script, it must be committed to git.
104+
105+
106+
Original file line number Diff line number Diff line change 11#!/usr/bin/env python
2+ """
3+ This script generates the gregorian_multilang.lark file
4+ with month names (full and abbreviated) based on the list of
5+ target languages.
6+
7+ Run this script with hatch to regeneate the file::
8+
9+ hatch run codegen:generate
10+
11+ """
212
313from collections import defaultdict
414import pathlib
2535
2636# warning to include at top of generated file
2737warning_text = """// WARNING: This file is auto-generated. DO NOT EDIT.
28- // To regenerate: uvx hatch run codegen:generate
38+ // To regenerate: hatch run codegen:generate
2939
3040"""
3141
Original file line number Diff line number Diff line change 11// WARNING: This file is auto-generated. DO NOT EDIT.
2- // To regenerate: uvx hatch run codegen:generate
2+ // To regenerate: hatch run codegen:generate
33
44month_1 : " January" | " Jan" | " enero" | " ene" | " janvier" | " janv" | " Januar" | " Mutarama" | " mut" | " Janwaliyo" | " ጥሪ"
55month_2 : " February" | " Feb" | " febrero" | " feb" | " février" | " févr" | " Februar" | " Gashyantare" | " gas" | " Febwaliyo" | " ለካቲት" | " ለካ"
You can’t perform that action at this time.
0 commit comments