# Generates Resources/Localization/strings.json import json import os ROOT = os.path.normpath(os.path.join(os.path.dirname(__file__), "../../Resources/Localization/strings.json")) def e(key, en, es="", pt="", de="", fr="", it=""): return { "key": key, "en": en, "es": es or en, "pt_BR": pt or en, "de": de or en, "fr": fr or en, "it": it or en, } entries = [] # Common entries += [ e("common.confirm", "CONFIRM", "CONFIRMAR", "CONFIRMAR", "BESTÄTIGEN", "CONFIRMER", "CONFERMA"), e("common.cancel", "CANCEL", "CANCELAR", "CANCELAR", "ABBRECHEN", "ANNULER", "ANNULLA"), e("common.ok", "OK"), e("common.open", "OPEN", "ABRIR", "ABRIR", "ÖFFNEN", "OUVRIR", "APRI"), e("common.select", "SELECT", "ELEGIR", "SELECIONAR", "AUSWÄHLEN", "CHOISIR", "SCEGLI"), e("common.reset", "RESET", "RESTABLECER", "REDEFINIR", "ZURÜCKSETZEN", "RÉINITIALISER", "REIMPOSTA"), e("common.back", "BACK", "VOLVER", "VOLTAR", "ZURÜCK", "RETOUR", "INDIETRO"), e("common.next", "NEXT", "SIGUIENTE", "PRÓXIMO", "WEITER", "SUIVANT", "AVANTI"), e("common.save", "SAVE", "GUARDAR", "SALVAR", "SPEICHERN", "ENREGISTRER", "SALVA"), e("common.retry", "RETRY", "REINTENTAR", "TENTAR DE NOVO", "ERNEUT", "RÉESSAYER", "RIPROVA"), e("common.resume", "RESUME", "CONTINUAR", "CONTINUAR", "FORTSETZEN", "REPRENDRE", "RIPRENDI"), e("common.quit", "QUIT", "SALIR", "SAIR", "BEENDEN", "QUITTER", "ESCI"), e("common.loading", "LOADING {0}%", "CARGANDO {0}%", "CARREGANDO {0}%", "LADEN {0}%", "CHARGEMENT {0}%", "CARICAMENTO {0}%"), e("common.free_play_footer", "FREE PLAY · NO CASH VALUE · V1.0.0"), e("common.retro_edition", "RETRO EDITION · SINGLE PLAYER"), e("common.retro_fruit_tagline", "RETRO FRUIT STAND · 3 MODES · 60 LEVELS"), ] # Modes / items entries += [ e("defs.mode.classic.name", "CLASSIC STAND", "PUESTO CLÁSICO", "BANCADA CLÁSSICA", "KLASSISCHER STAND", "STAND CLASSIQUE", "BANCO CLASSICO"), e("defs.mode.rush.name", "RUSH HOUR", "HORA PUNTA", "HORA DO RUSH", "STOSSZEIT", "HEURE DE POINTE", "ORA DI PUNTA"), e("defs.mode.sealed.name", "SEALED STAND", "PUESTO SELLADO", "BANCADA SELADA", "VERSIEGELTER STAND", "STAND SCELLÉ", "BANCO SIGILLATO"), e("defs.mode.classic.desc", "Tap a fruit, then tap a shelf. Empty the stand."), e("defs.mode.rush.desc", "A countdown runs - every set you serve adds 2 seconds."), e("defs.mode.sealed.desc", "Chained shelves stay shut until you serve enough sets."), e("defs.preview.moves", "{0} MOVES"), e("defs.preview.fruits", "{0} FRUITS"), e("defs.tag.no_timer", "NO TIMER"), e("defs.tag.timed", "TIMED"), e("defs.tag.chained", "CHAINED"), e("defs.item.hammer.name", "HAMMER"), e("defs.item.moves.name", "+5 MOVES"), e("defs.item.shuffle.name", "SHUFFLE"), e("defs.item.key.name", "MASTER KEY"), e("defs.item.key.short", "KEY"), e("defs.item.hammer.desc", "Smash any single fruit off a shelf. Free - does not cost a move."), e("defs.item.moves.desc", "Instantly add 5 moves to the current level."), e("defs.item.shuffle.desc", "Re-deal every visible fruit across the open shelves. Free - does not cost a move."), e("defs.item.key.desc", "Snap the chains off one sealed shelf. With no chains left it empties a shelf instead."), ] # Game entries += [ e("game.level_title", "LEVEL {0}", "NIVEL {0}", "FASE {0}", "LEVEL {0}", "NIVEAU {0}", "LIVELLO {0}"), e("game.mode_level", "{0} · LEVEL {1}"), e("game.moves", "{0} MOVES"), e("game.left_fruits", "LEFT {0}"), e("game.shelves", "{0} SHELVES"), e("game.fruit_types", "{0} FRUITS"), e("game.objective.empty", "EMPTY THE STAND"), e("game.objective.chains", "BREAK THE CHAINS"), e("game.objective.empty_desc", "SERVE EVERY SET OF 3"), e("game.objective.chains_desc", "CLEAR CHAINS BY SERVING SETS"), e("game.tip.tap_drag", "TAP A FRUIT , THEN A SHELF · OR DRAG IT"), e("game.still_no_stand", "STILL NOT THE STAND"), e("game.chains_left", "{0} CHAINS LEFT - SERVE SETS"), e("game.banner.stand_empty", "STAND EMPTY!"), e("game.chains_left", "{0} CHAINS LEFT - SERVE SETS"), e("game.objective_desc.classic", "Clear every shelf before moves run out."), e("game.objective_desc.sealed", "Serve sets to break chains, then clear the stand."), e("game.chains_left", "{0} CHAINS LEFT - SERVE SETS"), e("game.banner.no_hammer", "NO HAMMER LEFT - BUY IN SHOP"), e("game.banner.hammer_hint", "TAP A SHELF TO SMASH ITS FRONT FRUIT"), e("game.banner.hammer_cancel", "HAMMER CANCELLED"), e("game.banner.no_shuffle", "NO SHUFFLE LEFT - BUY IN SHOP"), e("game.banner.no_key", "NO MASTER KEY LEFT - BUY IN SHOP"), e("game.banner.tap_fruit", "TAP A FRUIT, THEN A SHELF"), e("game.banner.chained", "THAT SHELF IS CHAINED SHUT"), e("game.banner.pick_first", "PICK A FRUIT FIRST"), e("game.banner.no_moves_pack", "NO +5 MOVES LEFT - BUY IN SHOP"), e("game.banner.moves_added", "+5 MOVES"), ] entries += [ e("pause.title", "PAUSED"), e("pause.hint", "Your progress on this level is not saved until you clear it."), e("result.cleared", "CLEARED"), e("result.sets_served", "SETS SERVED"), e("result.level_bonus", "LEVEL BONUS"), e("result.moves_left", "MOVES LEFT"), e("result.fruit_left", "FRUIT LEFT"), e("result.leftover_moves", "LEFTOVER MOVES ×8"), e("result.win_summary", "{0} SETS SERVED · {1} MOVES LEFT"), e("result.draw_ticket", "+{0} DRAW TICKET"), e("result.next_level", "NEXT LEVEL"), e("result.replay_max", "REPLAY LV {0}"), e("result.time_up", "TIME UP"), e("result.no_moves", "NO MOVES"), e("result.lose_time_msg", "THE CLOCK RAN OUT — SERVE FASTER NEXT TIME."), e("result.lose_moves_msg", "NO MOVES LEFT — THE SHELVES ARE STILL LOADED."), e("pop.out_of_moves", "OUT OF MOVES"), e("pop.ad_moves_badge", "+{0} MOVES"), e("pop.ad_body", "Watch a short video to keep playing this level."), e("pop.watch_ad", "WATCH AD"), e("pop.end_run", "END RUN"), e("pop.ad_not_ready", "AD NOT READY"), ] # Lobby / screens entries += [ e("lobby.now_serving", "NOW SERVING"), e("lobby.choose_stand", "CHOOSE YOUR STAND"), e("lobby.local_player", "LOCAL PLAYER - LV.{0}"), e("lobby.top_award", "TOP AWARD {0}"), e("lobby.nav.checkin", "CHECK-IN"), e("lobby.nav.shop", "SHOP"), e("lobby.nav.draw", "DRAW"), e("lobby.nav.help", "HELP"), e("lobby.nav.profile", "PROFILE"), e("lobby.lv_short", "LV.{0}"), e("lobby.lv_progress", "LV {0} / {1}"), e("lobby.mode_level_selected", "{0} · LV {1}"), e("lobby.levels_count", "{0} LEVELS"), e("lobby.three_of_kind", "3 OF A KIND"), e("lobby.clock", "CLOCK"), e("lobby.chains", "CHAINS"), e("lobby.moves", "MOVES"), ] # Settings entries += [ e("settings.title", "SETTINGS"), e("settings.section.audio", "AUDIO"), e("settings.section.display", "DISPLAY"), e("settings.section.data", "DATA"), e("settings.section.about", "ABOUT"), e("settings.section.language", "LANGUAGE"), e("settings.music", "Music"), e("settings.sound_fx", "Sound FX"), e("settings.reduce_motion", "Reduce motion"), e("settings.music_desc", "Retro fruit-stand loop"), e("settings.motion_desc", "Skip flying fruit and confetti"), e("settings.local_save", "Local save"), e("settings.save_available", "Available"), e("settings.save_unavailable", "Unavailable — progress will not persist"), e("settings.coin_ledger", "Coin ledger"), e("settings.ledger_desc", "Every coin in and out"), e("settings.reset_save", "Reset save"), e("settings.reset_row_desc", "Erase all progress — cannot be undone"), e("settings.about_tagline", "Pick, drop, serve, coins"), e("settings.about_sections", "AUDIO · DISPLAY · DATA"), e("settings.version_line", "Crazy Fruit Master 1.0.0 · 3 modes · 60 levels"), e("settings.version", "Version"), e("settings.language.row", "Language"), e("settings.language.switch", "Switch Language"), e("settings.language.choose", "CHOOSE YOUR LANGUAGE"), e("settings.language.hint", "TAP A LANGUAGE TO SELECT IT"), e("settings.reset_title", "RESET SAVE?"), e("settings.reset_warning", "THIS CANNOT BE UNDONE"), e("settings.reset_body", "All coins, power-ups and level progress will be erased."), ] # Toasts entries += [ e("toast.save_reset", "SAVE RESET"), e("toast.avatar_updated", "AVATAR UPDATED"), e("toast.name_short", "NAME NEEDS 3+ LETTERS"), e("toast.name_updated", "NAME UPDATED"), e("toast.need_coins", "NEED {0} MORE COINS"), e("toast.item_purchased", "{0} PURCHASED"), e("toast.draw_tickets", "CLEAR A LEVEL TO EARN DRAW TICKETS"), e("toast.checkin_coins", "DAY {0} CLAIMED: +{1} COINS"), e("toast.checkin_item", "DAY {0} CLAIMED: {1}"), e("toast.draw_coins", "+{0} COINS"), e("toast.draw_item", "+1 {0}"), ] # Shop / checkin / draw / profile / help headers entries += [ e("shop.title", "FRUIT SHOP"), e("shop.subtitle", "POWER-UPS FOR COINS"), e("shop.footer", "Coins are earned by playing. There is no purchase option."), e("shop.items", "ITEMS"), e("shop.owned", "OWNED {0}"), e("shop.ledger", "LEDGER"), e("shop.recent", "RECENT ACTIVITY"), e("shop.earned", "EARNED"), e("shop.spent", "SPENT"), e("shop.balance", "BALANCE"), e("checkin.title", "DAILY CHECK-IN"), e("checkin.subtitle", "DAY {0} OF {1} · RESETS DAILY"), e("checkin.claim_day", "CLAIM DAY {0}"), e("checkin.claimed_today", "CLAIMED TODAY"), e("checkin.day_label", "DAY {0}"), e("checkin.miss_note", "Miss a day and the reward moves on — it never stacks."), e("draw.title", "LUCKY DRAW"), e("draw.subtitle", "1 FREE SPIN EVERY DAY"), e("draw.hint", "Clear a level to earn draw tickets."), e("draw.free_today", "FREE\nTODAY"), e("draw.ticket", "TICKET\n×{0}"), e("draw.no_ticket", "NO\nTICKET"), e("profile.title", "PLAYER PROFILE"), e("profile.local_save", "LOCAL SAVE · NO ACCOUNT"), e("profile.name", "NAME"), e("profile.name_placeholder", "Enter name..."), e("profile.avatar", "AVATAR"), e("profile.levels_cleared", "LEVELS CLEARED"), e("profile.sets_served", "SETS SERVED"), e("profile.best_score", "BEST SCORE"), e("profile.coins_earned", "COINS EARNED"), e("profile.mode_progress", "MODE PROGRESS"), e("profile.level", "LEVEL {0}"), e("profile.player_id", "ID {0}"), e("help.title", "HOW TO PLAY"), e("help.tagline", "SORT 3 · SERVE · CLEAR"), e("help.basics", "THE BASICS"), e("help.faq", "FAQ"), e("help.replay_intro", "REPLAY INTRO"), e("help.faq.question", "QUESTION"), e("help.faq.answer", "ANSWER"), e("story.owner", "OWNER · CRAZY FRUIT MASTER"), e("story.character", "MADAME ZEST"), e("story.start_shift", "START SHIFT"), ] # Help basics 1-6 BASICS = [ ("TAP A FRUIT", "Tap any fruit on the front of a shelf to pick it up. It lifts up and starts glowing so you know it is held."), ("DROP IT ON A SHELF", "Tap a shelf — or drag the fruit onto it. A shelf with room takes the fruit; a full shelf swaps it with the fruit you dropped on. Each action costs one move."), ("SERVE A SET OF 3", "Three identical fruits on the same shelf pop instantly and are served. Serving is free — it never costs a move."), ("EMPTY THE STAND", "Clear every fruit from every shelf before your moves run out. That clears the level."), ("DIG THROUGH LAYERS", "Some shelves hide a second layer behind the front row — you can see its shadow through the gaps. Clear the front row and the layer behind slides forward."), ("USE POWER-UPS", "Hammer, Shuffle and Master Key are free actions. +5 Moves buys you breathing room. Buy more in the shop."), ] for i, (t, b) in enumerate(BASICS, 1): entries.append(e(f"help.basic{i}.title", t)) entries.append(e(f"help.basic{i}.body", b)) FAQS = [ ("How do I clear a level?", "Empty every shelf on the stand before you run out of moves. Each tap that moves a fruit counts as one move; serving a set of three is free."), ("Do I choose where the fruit goes?", "Yes. Tap a fruit to pick it up, then tap any shelf — or drag the fruit onto it. You can put it anywhere that still has a free slot."), ("What if the shelf is already full?", "Drop on a full shelf and the two fruits trade places — the one you are holding goes in, the one you dropped on comes back to the shelf you took it from. That also costs one move."), ("What happens when a shelf holds three of a kind?", "They are served immediately and the shelf is empty again. You cannot hold a set of three and save it for later."), ("What are the hidden layers?", "Some shelves carry a second row of fruit behind the front row. You can see their shadow through the gaps. Once the front row is gone the hidden row slides forward and becomes tappable."), ("What do the chains mean?", "Chained shelves cannot be used at all. Every set you serve removes one chain from every chained shelf. Master Key snaps one shelf open instantly."), ("Do power-ups cost a move?", "Hammer, Shuffle and Master Key do not. +5 Moves simply adds five moves to the counter."), ("Why can I not drop it there?", "That shelf is chained shut, or it already holds three fruits. Pick another highlighted shelf."), ("How do I earn coins?", "Every served set pays 2 coins. Clearing a level pays a bonus, and leftover moves pay 8 coins each."), ("How do I get draw tickets?", "The first clear of level 1 always drops one ticket. Every other clear has a 35% chance."), ("Does progress save?", "Yes — coins, power-ups, level progress, name and daily counters are stored in this browser."), ("Is there anything to buy with real money?", "No. This is a free single-player prototype with no purchases, ads or cash value."), ] for i, (t, b) in enumerate(FAQS, 1): entries.append(e(f"help.faq{i}.title", t)) entries.append(e(f"help.faq{i}.body", b)) STORY = [ ("DAY 1 · OPENING SHIFT", "So you're the new stock hand. This stand is mine — Madame Zest's — and the doors open at nine sharp."), ("DAY 1 · THE RULES", "Every shelf spotless. Every crate empty. Three of a kind goes back to the storeroom — that is the whole job."), ("DAY 1 · THE TRICK", "Shelf full? Swap the odd one out. Tap a fruit, then tap a shelf — or just drag it across."), ("DAY 1 · THE CATCH", "You only get so many moves a shift. Waste them and you'll be mopping the gutter by noon."), ("DAY 1 · GET TO WORK", "Now empty that stand. And don't bruise the melons."), ] for i, (t, b) in enumerate(STORY, 1): entries.append(e(f"story.page{i}.title", t)) entries.append(e(f"story.page{i}.body", b)) os.makedirs(os.path.dirname(ROOT), exist_ok=True) with open(ROOT, "w", encoding="utf-8") as f: json.dump({"entries": entries}, f, ensure_ascii=False, indent=2) print(len(entries), "entries ->", ROOT)