From 35e1f1e1f3a86734d511528b931ed4c8522cc263 Mon Sep 17 00:00:00 2001 From: Crabman77 Date: Sun, 24 Jul 2022 17:39:27 +0200 Subject: [PATCH] Translate client-side and remove intllib support --- init.lua | 9 ++----- locale/de.txt | 1 - locale/food_sweet.de.tr | 37 ++++++++++++++++++++++++++ locale/food_sweet.fr.tr | 41 +++++++++++++++++++++++++++++ locale/template.txt | 58 ++++++++++++++++++++--------------------- 5 files changed, 109 insertions(+), 37 deletions(-) delete mode 100644 locale/de.txt create mode 100644 locale/food_sweet.de.tr create mode 100644 locale/food_sweet.fr.tr diff --git a/init.lua b/init.lua index 28e8161..a1e0988 100644 --- a/init.lua +++ b/init.lua @@ -13,13 +13,8 @@ if not food or not food.version or food.version < 2.3 then error("You need to update your version of the Food mod - it is too old") end --- Boilerplate to support localized strings if intllib mod is installed. -local S -if minetest.get_modpath("intllib") then - S = intllib.Getter() -else - S = function ( s ) return s end -end +-- Boilerplate to support localized strings. +local S = minetest.get_translator("food_sweet") food.support("strawberry", { "farming_plus:strawberry_item", diff --git a/locale/de.txt b/locale/de.txt deleted file mode 100644 index 24a71d0..0000000 --- a/locale/de.txt +++ /dev/null @@ -1 +0,0 @@ -Strawberry = Erdbeere diff --git a/locale/food_sweet.de.tr b/locale/food_sweet.de.tr new file mode 100644 index 0000000..95434a4 --- /dev/null +++ b/locale/food_sweet.de.tr @@ -0,0 +1,37 @@ +# textdomain: food_sweet + +### init.lua ### +Walnut= +Strawberry=Strawberry +Blueberry= +Rhubarb= +Lemon= + +# Cakes +Walnut and Coffee Cake= +Walnut and Coffee Cake Mix= +Strawberry Cheese Cake= +Strawberry Cheese Cake Mix= +Blueberry Cheese Cake= +Blueberry Cheese Cake Mix= +Triple Chocolate Cake= +Triple Chocolate Cake Mix= +Wedding Cake= + +# Crumbles +Rhubarb Crumble= +Raw Rhubarb Crumble= + +# Cupcake and derivs +Cupcake= +Cupcake Mix= +Chocolate Cupcake= +Chocolate Cupcake Mix= +Lemon Drizzle Cupcake= +Fairy Cake= + +# Muffins +Blueberry Muffin= +Blueberry Muffin Mix= +Chocolate Chip Muffin= +Chocolate Chip Muffin Mix= diff --git a/locale/food_sweet.fr.tr b/locale/food_sweet.fr.tr new file mode 100644 index 0000000..5f14a6f --- /dev/null +++ b/locale/food_sweet.fr.tr @@ -0,0 +1,41 @@ +# textdomain: food_sweet + +### init.lua ### + + +Walnut=Noix +Strawberry=Fraise +Blueberry=Myrtille +Rhubarb=Rhubarbe +Lemon=Citron + +# Cakes +Walnut and Coffee Cake=Gâteau aux noix et au café +Walnut and Coffee Cake Mix=Mélange à gâteau aux noix et au café +Strawberry Cheese Cake=Gâteau au fromage et aux fraises +Strawberry Cheese Cake Mix=Mélange à gâteau au fromage et aux fraises +Blueberry Cheese Cake=Gateau au fromage et aux myrtilles +Blueberry Cheese Cake Mix=Mélange à gâteau au fromage et aux myrtilles +Triple Chocolate Cake=Gâteau aux trois chocolats +Triple Chocolate Cake Mix=Mélange à gâteau triple chocolat +Wedding Cake=Gâteau de mariage + +# Crumbles +Rhubarb Crumble=Crumble à la rhubarbe +Raw Rhubarb Crumble=Crumble à la rhubarbe crue + + +# Cupcake and derivs +Cupcake=Cupcake +Cupcake Mix=Mélange à cupcakes +Chocolate Cupcake=Cupcake au chocolat +Chocolate Cupcake Mix=Mélange à cupcakes au chocolat +Lemon Drizzle Cupcake=Cupcake au citron +Fairy Cake=Gateau féerique + + +# Muffins +Blueberry Muffin=Muffin aux myrtilles +Blueberry Muffin Mix=Mélange pour muffins aux myrtilles +Chocolate Chip Muffin=Muffin aux pépites de chocolat +Chocolate Chip Muffin Mix=Mélange pour muffins aux pépites de chocolat diff --git a/locale/template.txt b/locale/template.txt index 14a7d80..28184b0 100644 --- a/locale/template.txt +++ b/locale/template.txt @@ -1,37 +1,37 @@ -# template -# Supported -Walnut = -Strawberry = -Blueberry = -Rhubarb = -Lemon = +# textdomain: food_sweet + +### init.lua ### +Walnut= +Strawberry= +Blueberry= +Rhubarb= +Lemon= # Cakes -Walnut and Coffee Cake = -Walnut and Coffee Cake Mix = -Strawberry Cheese Cake = -Strawberry Cheese Cake Mix = -Blueberry Cheese Cake = -Blueberry Cheese Cake Mix = -Triple Chocolate Cake = -Triple Chocolate Cake Mix = -Wedding Cake = +Walnut and Coffee Cake= +Walnut and Coffee Cake Mix= +Strawberry Cheese Cake= +Strawberry Cheese Cake Mix= +Blueberry Cheese Cake= +Blueberry Cheese Cake Mix= +Triple Chocolate Cake= +Triple Chocolate Cake Mix= +Wedding Cake= # Crumbles -Rhubarb Crumble = -Raw Rhubarb Crumble = +Rhubarb Crumble= +Raw Rhubarb Crumble= # Cupcake and derivs -Cupcake = -Cupcake Mix = -Chocolate Cupcake = -Chocolate Cupcake Mix = -Lemon Drizzle Cupcake = -Fairy Cake = +Cupcake= +Cupcake Mix= +Chocolate Cupcake= +Chocolate Cupcake Mix= +Lemon Drizzle Cupcake= +Fairy Cake= # Muffins -Chocolate Chip Muffin = -Chocolate Chip Muffin Mix = -Blueberry Muffin = -Blueberry Muffin Mix = - +Blueberry Muffin= +Blueberry Muffin Mix= +Chocolate Chip Muffin= +Chocolate Chip Muffin Mix=