Skip to content

Commit

Permalink
split translation file into smaller ones
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed May 30, 2024
1 parent 54fea8f commit 6910bd8
Show file tree
Hide file tree
Showing 26 changed files with 138,909 additions and 138,851 deletions.
18 changes: 14 additions & 4 deletions scripts/prepare_translations.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,22 @@
if intents:
with open(f"{tx}/{lang.lower()}/intents.json", "w") as f:
json.dump(intents, f, indent=4)
if dialogs:
with open(f"{tx}/{lang.lower()}/dialogs.json", "w") as f:
json.dump(dialogs, f, indent=4)
if vocs:
with open(f"{tx}/{lang.lower()}/vocabs.json", "w") as f:
json.dump(vocs, f, indent=4)
if regexes:
with open(f"{tx}/{lang.lower()}/regexes.json", "w") as f:
json.dump(regexes, f, indent=4)
json.dump(regexes, f, indent=2)
if dialogs:
dialogs = {k: sorted(v) for k, v in dialogs.items()}
if len(dialogs) > 50:
files = list(dialogs.items())
i = 0
while len(files):
i += 1
chunk, files = files[:50], files[50:]
with open(f"{tx}/{lang.lower()}/dialogs_{i}.json", "w") as f:
json.dump({k:v for k, v in chunk}, f, indent=2)
else:
with open(f"{tx}/{lang.lower()}/dialogs.json", "w") as f:
json.dump(dialogs, f, indent=2)
6 changes: 5 additions & 1 deletion scripts/sync_translations.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@
with open(f"{locale}/{lang.lower()}/{fid}", "w") as f:
f.write("\n".join(sorted(samples)))

if os.path.isfile(dialogs):
for f in os.listdir(f"{tx}/{lang}"):
if f.startswith("dialogs") and f.endswith(".json"):
dialogs = f"{tx}/{lang}/{f}"
else:
continue
with open(dialogs) as f:
data = json.load(f)
for fid, samples in data.items():
Expand Down
138,846 changes: 0 additions & 138,846 deletions translations/en-us/dialogs.json

This file was deleted.

6,174 changes: 6,174 additions & 0 deletions translations/en-us/dialogs_1.json

Large diffs are not rendered by default.

6,603 changes: 6,603 additions & 0 deletions translations/en-us/dialogs_10.json

Large diffs are not rendered by default.

6,311 changes: 6,311 additions & 0 deletions translations/en-us/dialogs_11.json

Large diffs are not rendered by default.

6,902 changes: 6,902 additions & 0 deletions translations/en-us/dialogs_12.json

Large diffs are not rendered by default.

7,374 changes: 7,374 additions & 0 deletions translations/en-us/dialogs_13.json

Large diffs are not rendered by default.

5,707 changes: 5,707 additions & 0 deletions translations/en-us/dialogs_14.json

Large diffs are not rendered by default.

6,252 changes: 6,252 additions & 0 deletions translations/en-us/dialogs_15.json

Large diffs are not rendered by default.

6,261 changes: 6,261 additions & 0 deletions translations/en-us/dialogs_16.json

Large diffs are not rendered by default.

5,875 changes: 5,875 additions & 0 deletions translations/en-us/dialogs_17.json

Large diffs are not rendered by default.

5,345 changes: 5,345 additions & 0 deletions translations/en-us/dialogs_18.json

Large diffs are not rendered by default.

6,336 changes: 6,336 additions & 0 deletions translations/en-us/dialogs_19.json

Large diffs are not rendered by default.

6,181 changes: 6,181 additions & 0 deletions translations/en-us/dialogs_2.json

Large diffs are not rendered by default.

6,870 changes: 6,870 additions & 0 deletions translations/en-us/dialogs_20.json

Large diffs are not rendered by default.

5,798 changes: 5,798 additions & 0 deletions translations/en-us/dialogs_21.json

Large diffs are not rendered by default.

6,403 changes: 6,403 additions & 0 deletions translations/en-us/dialogs_22.json

Large diffs are not rendered by default.

159 changes: 159 additions & 0 deletions translations/en-us/dialogs_23.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
{
"day_13_month_1_deaths.dialog": [
"1001 - Death of Fujiwara no Teishi, Japanese empress (b. 977)",
"1147 - Death of Robert de Craon, Grand Master of the Knights Templar",
"1151 - Death of Suger, French historian and politician (b. 1081)",
"1177 - Death of Henry II, count palatine and duke of Austria (b. 1107)",
"1321 - Death of Bonacossa Borri, Italian noblewoman (b. 1254)",
"1330 - Death of Frederick I, duke and king of Germany",
"1363 - Death of Meinhard III, German nobleman (b. 1344)",
"1400 - Death of Thomas le Despenser, 1st Earl of Gloucester, English politician (b. 1373)",
"1599 - Death of Edmund Spenser, English poet, Chief Secretary for Ireland (b. 1552)",
"1612 - Death of Jane Dormer, English lady-in-waiting (b. 1538)",
"1625 - Death of Jan Brueghel the Elder, Flemish painter (b. 1568)",
"1684 - Death of Henry Howard, 6th Duke of Norfolk, English nobleman (b. 1628)",
"1691 - Death of George Fox, English religious leader, founded the Religious Society of Friends (b. 1624)",
"1717 - Death of Maria Sibylla Merian, German entomologist and illustrator (b. 1647)",
"1775 - Death of Johann Georg Walch, German theologian and author (b. 1693)",
"1790 - Death of Luc Urbain de Bou\u00ebxic, French admiral (b. 1712)",
"1796 - Death of John Anderson, Scottish philosopher and educator (b. 1726)",
"1832 - Death of Thomas Lord, English cricketer, founded Lord's Cricket Ground (b. 1755)",
"1838 - Death of Ferdinand Ries, German pianist and composer (b. 1784)",
"1860 - Death of William Mason, American surgeon and politician (b. 1786)",
"1864 - Death of Stephen Foster, American composer and songwriter (b. 1826)",
"1872 - Death of William Scamp, English architect and engineer (b. 1801)",
"1882 - Death of Wilhelm Mauser, German engineer and businessman, co-founded the Mauser Company (b. 1834)",
"1885 - Death of Schuyler Colfax, American journalist and politician, 17th Vice President of the United States (b. 1823)",
"1889 - Death of Solomon Bundy, American lawyer and politician (b. 1823)",
"1906 - Death of Alexander Stepanovich Popov, Russian physicist and academic (b. 1859)",
"1907 - Death of Jakob Hurt, Estonian theologist and linguist (b. 1839)",
"1915 - Death of Mary Slessor, Scottish-Nigerian missionary (b. 1848)",
"1916 - Death of Victoriano Huerta, Mexican military officer and president, 1913-1914 (b. 1850)",
"1923 - Death of Alexandre Ribot, French academic and politician, Prime Minister of France (b. 1842)",
"1924 - Death of Georg Hermann Quincke, German physicist and academic (b. 1834)",
"1928 - Death of Earle Nelson, American serial killer",
"1929 - Death of H. B. Higgins, Irish-Australian judge and politician, 3rd Attorney-General for Australia (b. 1851)",
"1929 - Death of Wyatt Earp, American police officer (b. 1848)",
"1934 - Death of Paul Ulrich Villard, French physicist and chemist (b. 1860)",
"1941 - Death of James Joyce, Irish novelist, short story writer, and poet (b. 1882)",
"1943 - Death of Sophie Taeuber-Arp, Swiss painter and sculptor (b. 1889)",
"1949 - Death of Aino Aalto, Finnish architect and designer (b. 1894)",
"1956 - Death of Lyonel Feininger, German-American painter and illustrator (b. 1871)",
"1957 - Death of A. E. Coppard English poet and short story writer (b. 1878)",
"1958 - Death of Edna Purviance, American actress (b. 1895)",
"1958 - Death of Jesse L. Lasky, American film producer, co-founded Paramount Pictures (b. 1880)",
"1962 - Death of Ernie Kovacs, American actor and game show host (b. 1919)",
"1963 - Death of Sylvanus Olympio, Togolese businessman and politician, President of Togo (b. 1902)",
"1967 - Death of Anatole de Grunwald, Russian-English screenwriter and producer (b. 1910)",
"1971 - Death of Robert Still, English composer and educator (b. 1910)",
"1973 - Death of Sabahattin Ey\u00fcbo\u011flu, Turkish screenwriter and producer (b. 1908)",
"1974 - Death of Raoul Jobin, Canadian tenor and educator (b. 1906)",
"1974 - Death of Salvador Novo, Mexican playwright and poet (b. 1904)",
"1976 - Death of Margaret Leighton, English actress (b. 1922)",
"1977 - Death of Henri Langlois, Turkish-French historian, co-founded the Cin\u00e9math\u00e8que Fran\u00e7aise (b. 1914)",
"1978 - Death of Hubert Humphrey, American pharmacist, academic, and politician, 38th Vice President of the United States (b. 1911)",
"1978 - Death of Joe McCarthy, American baseball player and manager (b. 1887)",
"1979 - Death of Donny Hathaway, American singer-songwriter, pianist, and producer (b. 1945)",
"1979 - Death of Marjorie Lawrence, Australian-American soprano (b. 1907)",
"1980 - Death of Andre Kostelanetz, Russian-American conductor (b. 1901)",
"1982 - Death of Marcel Camus, French director and screenwriter (b. 1912)",
"1983 - Death of Ren\u00e9 Bonnet, French race car driver and engineer (b. 1904)",
"1986 - Death of Abdul Fattah Ismail, Yemeni educator and politician, 4th President of South Yemen (b. 1939)",
"1986 - Death of Kevin Longbottom, Australian rugby league player (b. 1940)",
"1988 - Death of Chiang Ching-kuo, Chinese politician, President of the Republic of China (b. 1910)",
"1993 - Death of Camargo Guarnieri, Brazilian composer and conductor (b. 1907)",
"1995 - Death of Max Harris, Australian journalist, poet, and author (b. 1921)",
"2002 - Death of Frank Shuster, Canadian actor, comedian, and screenwriter (b. 1916)",
"2003 - Death of Norman Panama, American director and screenwriter (b. 1914)",
"2004 - Death of Arne N\u00e6ss, Jr., Norwegian businessman and mountaineer (b. 1937)",
"2005 - Death of Earl Cameron, Canadian journalist (b. 1915)",
"2005 - Death of Nell Rankin, American soprano and actress (b. 1924)",
"2006 - Death of Frank Fixaris, American journalist and sportscaster (b. 1934)",
"2006 - Death of Marc Potvin, Canadian-American ice hockey player and coach (b. 1967)",
"2007 - Death of Danny Oakes, American race car driver (b. 1911)",
"2007 - Death of Michael Brecker, American saxophonist and composer (b. 1949)",
"2008 - Death of Johnny Podres, American baseball player and coach (b. 1932)",
"2009 - Death of Dai Llewellyn, Welsh socialite and politician (b. 1946)",
"2009 - Death of Mansour Rahbani, Lebanese poet, composer, and producer (b. 1925)",
"2009 - Death of Nancy Bird Walton, Australian pilot (b. 1915)",
"2009 - Death of Patrick McGoohan, Irish-American actor, director, and producer (b. 1928)",
"2009 - Death of W. D. Snodgrass, American poet (b. 1926)",
"2010 - Death of Teddy Pendergrass, American singer-songwriter (b. 1950)",
"2011 - Death of Albert Heijn, Dutch businessman (b. 1927)",
"2012 - Death of Guido Dessauer, German physicist and engineer (b. 1915)",
"2012 - Death of Miljan Miljani\u0107, Serbian footballer and manager (b. 1930)",
"2012 - Death of Rauf Denkta\u015f, Turkish-Cypriot lawyer and politician, 1st President of Northern Cyprus (b. 1924)",
"2013 - Death of Chia-Chiao Lin, Chinese-American mathematician and academic (b. 1916)",
"2013 - Death of Diogenes Allen, American philosopher and theologian (b. 1932)",
"2013 - Death of Rodney Mims Cook, Sr., American lieutenant and politician (b. 1924)",
"2014 - Death of Bobby Collins, Scottish footballer and manager (b. 1931)",
"2014 - Death of Randal Tye Thomas, American journalist and politician (b. 1978)",
"2014 - Death of Waldemar von Gazen, German general and lawyer (b. 1917)",
"2015 - Death of Mark Juddery, Australian journalist and author (b. 1971)",
"2015 - Death of Robert White, American diplomat, United States Ambassador to Paraguay (b. 1926)",
"2016 - Death of Brian Bedford, English-American actor and director (b. 1935)",
"2016 - Death of Giorgio Gomelsky, Georgian-American director, producer, songwriter, and manager (b. 1934)",
"2016 - Death of Lawrence Phillips, American football player (b. 1975)",
"2017 - Death of Antony Armstrong-Jones, 1st Earl of Snowdon, English photographer and a former member of the British royal family (b. 1930)",
"2017 - Death of Dick Gautier, American actor (b. 1931)",
"2017 - Death of Magic Alex, Greek electronics engineer (b. 1942)",
"2019 - Death of Phil Masinga, South African footballer (b. 1969)",
"2020 - Death of Bryan Monroe, American journalist and educator, (b. 1965)",
"2020 - Death of Philip Tartaglia, Scottish prelate, Catholic archbishop of Glasgow (b. 1951)",
"2024 - Death of Joyce Randolph, American actress (b. 1924)",
"533 - Death of Remigius, French bishop and saint (b. 437)",
"614 - Death of Mungo, English-Scottish bishop and saint",
"703 - Death of Jit\u014d, Japanese empress (b. 645)",
"858 - Death of \u00c6thelwulf, king of Wessex",
"86 BC - Death of Gaius Marius, Roman general and politician (b. 157 BC)",
"888 - Death of Charles the Fat, Frankish king and emperor (b. 839)",
"927 - Death of Berno of Cluny, Frankish monk and abbot"
],
"day_2_month_5_events.dialog": [
"1194 - King Richard I of England gives Portsmouth its first royal charter.",
"1230 - William de Braose is hanged by Prince Llywelyn the Great.",
"1536 - Anne Boleyn, Queen of England, is arrested and imprisoned on charges of adultery, incest, treason and witchcraft.",
"1559 - John Knox returns from exile to Scotland to become the leader of the nascent Scottish Reformation.",
"1568 - Mary, Queen of Scots, escapes from Lochleven Castle.",
"1611 - The King James Version of the Bible is published for the first time in London, England, by printer Robert Barker.",
"1625 - Afonso Mendes, appointed by Pope Gregory XV as Latin Patriarch of Ethiopia, arrives at Beilul from Goa.",
"1670 - King Charles II of England grants a permanent charter to the Hudson's Bay Company to open up the fur trade in North America.",
"1808 - Outbreak of the Peninsular War: The people of Madrid rise up in rebellion against French occupation. Francisco de Goya later memorializes this event in his painting The Second of May 1808.",
"1812 - The Siege of Cuautla during the Mexican War of Independence ends with both sides claiming victory.",
"1829 - After anchoring nearby, Captain Charles Fremantle of HMS\u00a0Challenger, declares the Swan River Colony in Australia.",
"1863 - American Civil War: Stonewall Jackson is wounded by friendly fire while returning to camp after reconnoitering during the Battle of Chancellorsville. He succumbs to pneumonia eight days later.",
"1866 - Peruvian defenders fight off the Spanish fleet at the Battle of Callao.",
"1876 - The April Uprising breaks out in Ottoman Bulgaria.",
"1885 - Cree and Assiniboine warriors win the Battle of Cut Knife, their largest victory over Canadian forces during the North-West Rebellion.",
"1889 - Menelik II, Emperor of Ethiopia, signs the Treaty of Wuchale, giving Italy control over Eritrea.",
"1906 - Closing ceremony of the Intercalated Games in Athens, Greece.",
"1920 - The first game of the Negro National League baseball is played in Indianapolis.",
"1933 - Germany's independent labor unions are replaced by the German Labour Front.",
"1941 - World War II: Following the coup d'\u00e9tat against Iraq Crown Prince 'Abd al-Ilah earlier that year, the United Kingdom launches the Anglo-Iraqi War to restore him to power.",
"1945 - World War II: A death march from Dachau to the Austrian border is halted by the segregated, all-Nisei 522nd Field Artillery Battalion of the U.S. Army in southern Bavaria, saving several hundred prisoners.",
"1945 - World War II: The Soviet Union announces the fall of Berlin.",
"1945 - World War II: The US 82nd Airborne Division liberates W\u00f6bbelin concentration camp finding 1,000 dead prisoners, most of whom starved to death.",
"1945 - World War II: The surrender of Caserta comes into effect, by which German troops in Italy cease fighting.",
"1952 - A De Havilland Comet makes the first jetliner flight with fare-paying passengers, from London to Johannesburg.",
"1963 - Berthold Seliger launches a rocket with three stages and a maximum flight altitude of more than 100 kilometres (62\u00a0mi) near Cuxhaven. It is the only sounding rocket developed in Germany.",
"1964 - First ascent of Shishapangma, the fourteenth highest mountain in the world and the lowest of the Eight-thousanders.",
"1964 - Vietnam War: An explosion sinks the American aircraft carrier USNS Card while it is docked at Saigon. Two Viet Cong combat swimmers had placed explosives on the ship's hull. She is raised and returned to service less than seven months later.",
"1969 - The British ocean liner Queen Elizabeth 2 departs on her maiden voyage to New York City.",
"1970 - ALM Flight 980 ditches in the Caribbean Sea near Saint Croix, killing 23.",
"1972 - In the early morning hours a fire breaks out at the Sunshine Mine located between Kellogg and Wallace, Idaho, killing 91 workers.",
"1982 - Falklands War: The British nuclear submarine HMS\u00a0Conqueror sinks the Argentine cruiser ARA General Belgrano.",
"1986 - Chernobyl disaster: The City of Chernobyl is evacuated six days after the disaster.",
"1989 - Cold War: Hungary begins dismantling its border fence with Austria, which allows a number of East Germans to defect.",
"1995 - During the Croatian War of Independence, the Army of the Republic of Serb Krajina fires cluster bombs at Zagreb, killing seven and wounding over 175 civilians.",
"1998 - The European Central Bank is founded in Brussels in order to define and execute the European Union's monetary policy.",
"1999 - Panamanian general election: Mireya Moscoso becomes the first woman to be elected President of Panama.",
"2000 - President Bill Clinton announces that accurate GPS access would no longer be restricted to the United States military.",
"2004 - The Yelwa massacre concludes. It began on 4 February 2004 when armed Muslims killed 78 Christians at Yelwa, Nigeria. In response, about 630 Muslims were killed by Christians on May 2.",
"2008 - Chait\u00e9n Volcano begins erupting in Chile, forcing the evacuation of more than 4,500 people.",
"2008 - Cyclone Nargis makes landfall in Burma killing over 138,000 people and leaving millions of people homeless.",
"2011 - An E. coli outbreak strikes Europe, mostly in Germany, leaving more than 30 people dead and many others are taken ill.",
"2011 - Osama bin Laden, the suspected mastermind behind the September 11 attacks and the FBI's most wanted man, is killed by the United States special forces in Abbottabad, Pakistan.",
"2012 - A pastel version of The Scream, by Norwegian painter Edvard Munch, sells for $120\u00a0million in a New York City auction, setting a new world record for a work of art at auction.",
"2014 - Two mudslides in Badakhshan, Afghanistan, leave up to 2,500 people missing."
]
}
Loading

0 comments on commit 6910bd8

Please sign in to comment.