From 34eb3bdd5e282a77759b5ee7a4cf8493e817ec0c Mon Sep 17 00:00:00 2001 From: nokoe Date: Sat, 12 Oct 2024 15:53:25 +0200 Subject: translate metadata --- .gitignore | 1 + locale/en.ini | 2 + org.metamuffin.hurrycurry.client.desktop | 12 - org.metamuffin.hurrycurry.client.metainfo.xml | 248 --------------------- template.org.metamuffin.hurrycurry.client.desktop | 12 + ...e.org.metamuffin.hurrycurry.client.metainfo.xml | 232 +++++++++++++++++++ translate.py | 80 +++++++ 7 files changed, 327 insertions(+), 260 deletions(-) create mode 100644 .gitignore delete mode 100644 org.metamuffin.hurrycurry.client.desktop delete mode 100644 org.metamuffin.hurrycurry.client.metainfo.xml create mode 100644 template.org.metamuffin.hurrycurry.client.desktop create mode 100644 template.org.metamuffin.hurrycurry.client.metainfo.xml create mode 100644 translate.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9ee2643 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +org.metamuffin.hurrycurry.client.* diff --git a/locale/en.ini b/locale/en.ini index 25fc41e..f458ec5 100644 --- a/locale/en.ini +++ b/locale/en.ini @@ -6,6 +6,7 @@ i.contribute=Contribute i.credits.contributers=Other contributers include Sofviic, BigBrotherNii and RustyStriker. Detailed credits can be found in-game. i.credits.primary=The game is primarily being developed by {_developers}. i.credits=Credits +i.flatpak.controller.par=Controller support is currently disabled by default due to Flathub limitations. To enable it, run flatpak override --device=input org.metamuffin.hurrycurry.client. i.gameplay_overview.par=Customers enter your restaurant and order various meals. Your task is to assemble these meals by cutting, cooking, baking, searing and combining resources in the kitchen. Multitasking is crucial, but can lead to food burning or customers leaving if you take too long. There are many different restaurant/kitchen layouts to choose from. i.gameplay_overview=Gameplay Overview i.have_fun=Have fun! @@ -17,3 +18,4 @@ i.how_to_play=How to play i.installation.par=The source code repository is available on {_a_codeberg}Codeberg{_a_end}. Prebuilt packages can be downloaded from one of the following sources: i.installation=Installation i.public_servers=Public Servers +i.short_desc=A game about cooking \ No newline at end of file diff --git a/org.metamuffin.hurrycurry.client.desktop b/org.metamuffin.hurrycurry.client.desktop deleted file mode 100644 index ca74768..0000000 --- a/org.metamuffin.hurrycurry.client.desktop +++ /dev/null @@ -1,12 +0,0 @@ -[Desktop Entry] -Name=Hurry Curry! -Icon=org.metamuffin.hurrycurry.client -GenericName[de]=Ein Spiel rund ums Kochen -GenericName=A game about cooking -Exec=hurrycurry -Terminal=false -StartupNotify=false -Type=Application -Categories=Game; -Keywords=game;cooking; -PrefersNonDefaultGPU=true diff --git a/org.metamuffin.hurrycurry.client.metainfo.xml b/org.metamuffin.hurrycurry.client.metainfo.xml deleted file mode 100644 index 6ab1465..0000000 --- a/org.metamuffin.hurrycurry.client.metainfo.xml +++ /dev/null @@ -1,248 +0,0 @@ - - - org.metamuffin.hurrycurry.client - - Hurry Curry! - Multiplayer co-op coooking game - - - The Hurry Curry! contributors - - - CC-BY-SA-4.0 - AGPL-3.0-only - - - #f4a570 - #e38242 - - - - pointing - keyboard - touch - gamepad - - - - always - - - -

- Hurry Curry! is a multiplayer game about cooking. Your goal is to run a - restaurant and gain points by serving meals you've cooked.

-

- 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 support is currently disabled by default due to Flathub limitations. To - enable it, run - flatpak override --device=input org.metamuffin.hurrycurry.client. - 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.

-

- Touch support is currently unavailable on Wayland due to Godot limitations. To enable it, run - flatpak override --nosocket=wayland org.metamuffin.hurrycurry.client.

-

- Game developed by nokoe, metamuffin, tpart. Special thanks to RustyStriker for - playtesting and technical assistance. - Thanks to Sofviic for most of the maps. -

-
- - org.metamuffin.hurrycurry.client.desktop - - https://hurrycurry.metamuffin.org/ - https://codeberg.org/hurrycurry/hurrycurry/issues - - https://codeberg.org/hurrycurry/hurrycurry - https://codeberg.org/hurrycurry/hurrycurry - https://translate.codeberg.org/engage/hurrycurry/ - - - Game - - - - https://img.itch.zone/aW1hZ2UvMjgxOTEyNy8xNjg2MzQzMS5qcGVn/original/2O5lVR.jpeg - - - https://img.itch.zone/aW1hZ2UvMjgxOTEyNy8xNjg2MzQzMC5qcGVn/original/YDCBug.jpeg - - - https://img.itch.zone/aW1hZ2UvMjgxOTEyNy8xNjg2MzQzMy5qcGVn/original/ynbKBP.jpeg - - - https://img.itch.zone/aW1hZ2UvMjgxOTEyNy8xNjg2MzQzMi5qcGVn/original/CT6oZD.jpeg - - - - - intense - - - - - - -

- Banana Appetizer -

-

Fixed bugs:

-
    -
  • Customer had tie
  • -
  • Bot body color corrected
  • -
  • Fix player movement desync
  • -
-

New Features

-
    -
  • Customer demand scaling based on chairs
  • -
  • Ask for consent to contact registry
  • -
-
- https://codeberg.org/hurrycurry/hurrycurry/releases/tag/v2.1.1 -
- - -

- Banana Appetizer -

-

New Content:

-
    -
  • Orders need to be accepted now
  • -
  • Current orders are pinned to screen
  • -
  • Server discoverability through mDNS and a global registry
  • -
  • Added dish washer bot
  • -
  • Added "Salad Store" map
  • -
  • Added "Anti Curry!" recipe set and map
  • -
  • First person mode
  • -
-

Performance improvements

-
    -
  • Optimized grass rendering
  • -
  • Combined floor meshes
  • -
-

Bug fixes

-
    -
  • Fixed broken RTL layout
  • -
  • Fix missing customers in Sushi Bar
  • -
  • Immediatly awarding points on fulfilled orders
  • -
  • Fix join button not working in jobby
  • -
  • Fix broken teleport in conveyors.com
  • -
  • Fix text entry settings resetting the cursor
  • -
  • Fix bots being counted as players
  • -
  • Many smaller fixes, reducing overall bugginess
  • -
-
- https://codeberg.org/hurrycurry/hurrycurry/releases/tag/v2.1.0 -
- - -

- Banana -

-
    -
  • New burger recipes
  • -
  • New bun recipes
  • -
  • New items
  • -
  • Improved translation system
  • -
  • Interactive tutorial
  • -
  • More intuitive active recipes
  • -
  • Bug fixes
  • -
-
- https://codeberg.org/hurrycurry/hurrycurry/releases/tag/v2.0.0 -
- - -

- Apple Flavour -

-
    -
  • Improved chat system
  • -
  • Categorize settings with tabs
  • -
  • Add input settings
  • -
  • New translations
  • -
-
- https://codeberg.org/hurrycurry/hurrycurry/releases/tag/v1.6.0 -
- - -

- Apple Emitter -

-
    -
  • Improved chat system
  • -
  • Categorize settings with tabs
  • -
  • Add input settings
  • -
  • New translations
  • -
-
- https://codeberg.org/hurrycurry/hurrycurry/releases/tag/v1.5.1 -
- - -

- Apple Emitter -

-
- https://codeberg.org/hurrycurry/hurrycurry/releases/tag/v1.5.0 -
- - -

- Apple Doughnut -

-
- https://codeberg.org/hurrycurry/hurrycurry/releases/tag/v1.4.0 -
- - -

- Apple Candy -

-
- https://codeberg.org/hurrycurry/hurrycurry/releases/tag/v1.3.0 -
- - -

- Apple Biscuit -

-
- https://codeberg.org/hurrycurry/hurrycurry/releases/tag/v1.2.1 -
- - -

- Apple Biscuit -

-
- https://codeberg.org/hurrycurry/hurrycurry/releases/tag/v1.2.0 -
- - -

- Post-Jam Release -

-

- Includes a few fixes for bugs encountered right after the jam end and some more - features as well. -

-
- https://codeberg.org/hurrycurry/hurrycurry/releases/tag/v1.1.0 -
- - -

- Purism Game Jam release -

-
- https://codeberg.org/hurrycurry/hurrycurry/releases/tag/v1.0.0 -
-
-
\ No newline at end of file diff --git a/template.org.metamuffin.hurrycurry.client.desktop b/template.org.metamuffin.hurrycurry.client.desktop new file mode 100644 index 0000000..1da13a5 --- /dev/null +++ b/template.org.metamuffin.hurrycurry.client.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Name=Hurry Curry! +Icon=org.metamuffin.hurrycurry.client +GenericName[LANG]=i.short_desc +GenericName=A game about cooking +Exec=hurrycurry +Terminal=false +StartupNotify=false +Type=Application +Categories=Game; +Keywords=game;cooking; +PrefersNonDefaultGPU=true diff --git a/template.org.metamuffin.hurrycurry.client.metainfo.xml b/template.org.metamuffin.hurrycurry.client.metainfo.xml new file mode 100644 index 0000000..210351f --- /dev/null +++ b/template.org.metamuffin.hurrycurry.client.metainfo.xml @@ -0,0 +1,232 @@ + + + org.metamuffin.hurrycurry.client + + Hurry Curry! + Multiplayer co-op coooking game + + + The Hurry Curry! contributors + + + CC-BY-SA-4.0 + AGPL-3.0-only + + + #f4a570 + #e38242 + + + + pointing + keyboard + touch + gamepad + + + + always + + + +

i.abstract

+

i.gameplay_overview.par

+

i.how_to_play.keyboard_controls

+

i.how_to_play.controller_controls

+

i.flatpak.controller.par

+

i.credits.primary

+
+ + org.metamuffin.hurrycurry.client.desktop + + https://hurrycurry.metamuffin.org/ + https://codeberg.org/hurrycurry/hurrycurry/issues + + https://codeberg.org/hurrycurry/hurrycurry + https://codeberg.org/hurrycurry/hurrycurry + https://translate.codeberg.org/engage/hurrycurry/ + + + Game + + + + https://img.itch.zone/aW1hZ2UvMjgxOTEyNy8xNjg2MzQzMS5qcGVn/original/2O5lVR.jpeg + + + https://img.itch.zone/aW1hZ2UvMjgxOTEyNy8xNjg2MzQzMC5qcGVn/original/YDCBug.jpeg + + + https://img.itch.zone/aW1hZ2UvMjgxOTEyNy8xNjg2MzQzMy5qcGVn/original/ynbKBP.jpeg + + + https://img.itch.zone/aW1hZ2UvMjgxOTEyNy8xNjg2MzQzMi5qcGVn/original/CT6oZD.jpeg + + + + + intense + + + + + + +

+ Banana Appetizer +

+

Fixed bugs:

+
    +
  • Customer had tie
  • +
  • Bot body color corrected
  • +
  • Fix player movement desync
  • +
+

New Features

+
    +
  • Customer demand scaling based on chairs
  • +
  • Ask for consent to contact registry
  • +
+
+ https://codeberg.org/hurrycurry/hurrycurry/releases/tag/v2.1.0 +
+ + +

+ Banana Appetizer +

+

New Content:

+
    +
  • Orders need to be accepted now
  • +
  • Current orders are pinned to screen
  • +
  • Server discoverability through mDNS and a global registry
  • +
  • Added dish washer bot
  • +
  • Added "Salad Store" map
  • +
  • Added "Anti Curry!" recipe set and map
  • +
  • First person mode
  • +
+

Performance improvements

+
    +
  • Optimized grass rendering
  • +
  • Combined floor meshes
  • +
+

Bug fixes

+
    +
  • Fixed broken RTL layout
  • +
  • Fix missing customers in Sushi Bar
  • +
  • Immediatly awarding points on fulfilled orders
  • +
  • Fix join button not working in jobby
  • +
  • Fix broken teleport in conveyors.com
  • +
  • Fix text entry settings resetting the cursor
  • +
  • Fix bots being counted as players
  • +
  • Many smaller fixes, reducing overall bugginess
  • +
+
+ https://codeberg.org/hurrycurry/hurrycurry/releases/tag/v2.1.0 +
+ + +

+ Banana +

+
    +
  • New burger recipes
  • +
  • New bun recipes
  • +
  • New items
  • +
  • Improved translation system
  • +
  • Interactive tutorial
  • +
  • More intuitive active recipes
  • +
  • Bug fixes
  • +
+
+ https://codeberg.org/hurrycurry/hurrycurry/releases/tag/v2.0.0 +
+ + +

+ Apple Flavour +

+
    +
  • Improved chat system
  • +
  • Categorize settings with tabs
  • +
  • Add input settings
  • +
  • New translations
  • +
+
+ https://codeberg.org/hurrycurry/hurrycurry/releases/tag/v1.6.0 +
+ + +

+ Apple Emitter +

+
    +
  • Improved chat system
  • +
  • Categorize settings with tabs
  • +
  • Add input settings
  • +
  • New translations
  • +
+
+ https://codeberg.org/hurrycurry/hurrycurry/releases/tag/v1.5.1 +
+ + +

+ Apple Emitter +

+
+ https://codeberg.org/hurrycurry/hurrycurry/releases/tag/v1.5.0 +
+ + +

+ Apple Doughnut +

+
+ https://codeberg.org/hurrycurry/hurrycurry/releases/tag/v1.4.0 +
+ + +

+ Apple Candy +

+
+ https://codeberg.org/hurrycurry/hurrycurry/releases/tag/v1.3.0 +
+ + +

+ Apple Biscuit +

+
+ https://codeberg.org/hurrycurry/hurrycurry/releases/tag/v1.2.1 +
+ + +

+ Apple Biscuit +

+
+ https://codeberg.org/hurrycurry/hurrycurry/releases/tag/v1.2.0 +
+ + +

+ Post-Jam Release +

+

+ Includes a few fixes for bugs encountered right after the jam end and some more + features as well. +

+
+ https://codeberg.org/hurrycurry/hurrycurry/releases/tag/v1.1.0 +
+ + +

+ Purism Game Jam release +

+
+ https://codeberg.org/hurrycurry/hurrycurry/releases/tag/v1.0.0 +
+
+
diff --git a/translate.py b/translate.py new file mode 100644 index 0000000..39c5745 --- /dev/null +++ b/translate.py @@ -0,0 +1,80 @@ +#!/usr/bin/python +# translate.py +# Copyright 2024 nokoe +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, version 3 of the License only. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import os +import re +from string import Template + +templates = { + '{_a_browser_version}': '', + '{_a_book}': '', + '{_a_codeberg}': '', + '{_a_weblate}': '', + '{_a_end}': '', + '{_b}': '', + '{_b_end}': '', + '{_developers}': 'nokoe, metamuffin, tpart', +} + + +def add_languages(file, regex, format, langs): + with open(file) as f: + text = f.read() + for line in text.splitlines(): + m = regex.match(line) + if m: + w = m.group(1) + key = m.group(2).strip() + translate = m.group(3).strip() + to_substitute = [] + for lang in langs.keys(): + if translate in langs[ + lang] and not langs[lang][translate].strip() == "": + translated = langs[lang][translate] + for k in templates.keys(): + translated = translated.replace(k, templates[k]) + to_substitute.append( + format.substitute(key=key, + value=translated, + lang=lang, + w=w)) + text = text.replace(m.string, "\n".join(to_substitute)) + new_file = open(f.name.removeprefix("template."), "w") + new_file.write(text) + + +langs = {} +for i in [ + x for x in os.scandir("locale") + if x.is_file() and x.name.endswith(".ini") +]: + lang = i.name.removesuffix(".ini") + translations = {} + f = open(i) + next(f) + for line in f: + key, value = line.split("=", 1) + translations[key.strip()] = value.strip() + langs[lang] = translations + +add_languages("template.org.metamuffin.hurrycurry.client.desktop", + re.compile(r"^(\s*)(.*)\[LANG\]=(.*)$"), + Template("$w$key[$lang]=$value"), langs) + +add_languages("template.org.metamuffin.hurrycurry.client.metainfo.xml", + re.compile(r"(\s*)<(.*)\s*xml:lang=\"LANG\"\s*>(.*)"), + Template("$w<$key xml:lang=\"$lang\">$value"), langs) -- cgit v1.2.3-70-g09d2