From a7ae29a8257447227621efde489095ace81fd028 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sun, 6 Oct 2024 23:02:10 +0200 Subject: localize --- .gitignore | 2 + index.html | 192 ---------------------------------------------------- index_template.html | 159 +++++++++++++++++++++++++++++++++++++++++++ main | 1 + makefile | 17 +++++ translate.py | 38 +++++++++++ 6 files changed, 217 insertions(+), 192 deletions(-) create mode 100644 .gitignore delete mode 100644 index.html create mode 100644 index_template.html create mode 160000 main create mode 100644 makefile create mode 100644 translate.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..26d2956 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/index.*.html + diff --git a/index.html b/index.html deleted file mode 100644 index d5e8af6..0000000 --- a/index.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - Hurry Curry! by metamuffin, tpart, nokoe, SOF93 - - - - - -
- Hurry Curry! Cover Image -
-
- Screenshot - Screenshot - Screenshot - Screenshot -
-

- Hurry Curry! is a multiplayer game about cooking. - Your goal is to run a restaurant and gain points by serving - meals you've cooked. The game is completely free software, - licenced AGPL 3.0 only. -

- -

Gameplay Overview

-

- During the game, customers will enter your restaurant and order different meals. The players task is to - assemble these meals by cutting, cooking, baking and combining resources in the kitchen. Multitasking is - crucial but can lead to food burning or customers leaving if the player takes to long. There are many - different restaurant/kitchen layouts. -

- - - Hurry Curry! Gameplay Trailer - - -

How to play

-

- To play, download the game for your platform or use - the rather laggy browser version. - Then connect to a server, - either locally hosted or the one we provide ("Quick - Connect"). Assemble your team of chefs in the lobby before - starting the game. When playing for the first time the - "junior" map is recommended. -

-

- The recipes can be found in the Recipe - Book (also available ingame in some maps). -

-

- Keyboard Controls: Move character with WASD. Move camera - with arrow keys. Interact with Space or J. Boost with Left - Shift or K. Open/close menus with Escape. Press Enter to - open chat. Reset view with R. -

-

- Controller Controls: Move character with Left Stick. Move - camera with Right Stick. Interact with A, Boost with B, - Open/close menus with Menu button. Use keyboard for chat. - Reset view with Y. -

-

Installation

- -

- The source code repository is available on - Codeberg. Prebuilt packages can be downloaded - from one of the following sources: -

- - - - - - - - - - - - - - - - - - - - - - - - - - -
Standalone binaries: - -
Browser version - - Launch - -
Arch AUR: - -
Flathub: - -
Snap Store: - -
metamuffins's infrastructure repositories: - -
- - Get it on Codeberg - Get it on Flathub - Available on itch.io - Get it from the Snap Store - -

Public Servers

- - -

Credits

-

- The game is primarily developed by nokoe, metamuffin, tpart. - - Other contributers include Sofviic, BigBrotherNii and RustyStriker. -

- -

Contribute

-

You can help make the game better by contributing code through pull requests on Codeberg.

-

You can also translate the game to your language on Codeberg's Weblate

-
-
- Have fun! -
-
- - - diff --git a/index_template.html b/index_template.html new file mode 100644 index 0000000..d92ba84 --- /dev/null +++ b/index_template.html @@ -0,0 +1,159 @@ + + + + + + + Hurry Curry! by metamuffin, tpart, nokoe, SOF93 + + + + + +
+ Hurry Curry! Cover Image +
+
+ Screenshot + Screenshot + Screenshot + Screenshot +
+

{i.abstract}

+ +

{i.gameplay_overview}

+

{i.gameplay_overview.par}

+ + + Hurry Curry! Gameplay Trailer + + +

{i.how_to_play}

+

{i.how_to_play.par}

+

{i.how_to_play.book}

+

{i.how_to_play.keyboard_controls}

+

{i.how_to_play.controller_controls}

+ +

{i.installation}

+

{i.installation.par}

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Standalone binaries: + +
Browser version + + Launch + +
Arch AUR: + +
Flathub: + +
Snap Store: + +
metamuffins's infrastructure repositories: + +
+ + Get it on Codeberg + Get it on Flathub + Available on itch.io + Get it from the Snap Store + +

{i.public_servers}

+ + +

{i.credits}

+

+ {i.credits.primary} + + {i.credits.contributers} +

+ +

{i.contribute}

+

{i.contribute.par}

+

{i.contribute.translate}

+
+
{i.have_fun}
+
+ + + \ No newline at end of file diff --git a/main b/main new file mode 160000 index 0000000..a40aeca --- /dev/null +++ b/main @@ -0,0 +1 @@ +Subproject commit a40aeca5d1ade9df8dfdeec7e54e57649086a3e9 diff --git a/makefile b/makefile new file mode 100644 index 0000000..0551493 --- /dev/null +++ b/makefile @@ -0,0 +1,17 @@ + + +noop = +space = $(noop) $(noop) +comma = , +langs = $(patsubst main/locale/%.ini,%,$(wildcard main/locale/*.ini)) + +s_langs = $(subst $(space),$(comma),$(langs)) +out = $(shell echo index.{$(s_langs)}.html) + +.PHONY: all out +all: $(out) +clean: + rm -f $(out) + +index.%.html: main/locale/%.ini main/locale/en.ini + python translate.py $(*) diff --git a/translate.py b/translate.py new file mode 100644 index 0000000..c73a364 --- /dev/null +++ b/translate.py @@ -0,0 +1,38 @@ +import re +import sys + +lang = sys.argv[1] + +trmap = { + '_a_browser_version': '', + '_a_book': '', + '_a_codeberg': '', + '_a_weblate': '', + '_a_end': '', + '_b': '', + '_b_end': '', + '_developers': 'nokoe, metamuffin, tpart', + '_lang': lang, +} +for l in ["en", lang]: + for line in open(f"main/locale/{l}.ini"): + line = line.strip() + if line == "[hurrycurry]": continue + if line == "": continue + key, value = line.split("=") + trmap[key.strip()] = value.strip().replace("<","<").replace(">",">") + +s = open("index_template.html").read() + +def replace(matches): + x = matches.group(1) + if x in trmap: x = trmap[x] + else: x = f"MISSING TR ({x})" + return x + +while True: + sb = s + s = re.sub(r"\{([\w\.]+)\}", replace, s) + if s == sb: break + +open(f"index.{lang}.html","w+").write(s) -- cgit v1.2.3-70-g09d2