Commit Graph

22 Commits

Author SHA1 Message Date
novgorodschi catalin 33b7261b4b Change some file
Change some file
2026-06-04 13:39:59 +03:00
TravianZ Patcher 421915f774 Add per-user language selection (issue #166)
The profile already had a language selector (Templates/Profile/preference.tpl)
that saved the choice into users.lang and $_SESSION['lang'], but the saved
preference was never used to actually load the language: every page loads
include("Lang/".LANG.".php") with the server-wide LANG constant, so changing
the language in the profile had no visible effect.

This wires it up:

- Introduce SERVER_LANG (the server default) and make LANG the EFFECTIVE
  display language, resolved from the player's saved preference
  ($_SESSION['lang']) with a fallback to SERVER_LANG
  (install/data/constant_format.tpl).
  SECURITY: the value is sanitized to [a-z_] and the target Lang/<x>.php
  file must exist, otherwise we fall back to the server default. This
  prevents Local File Inclusion via include("Lang/".LANG.".php").

- Seed $_SESSION['lang'] from users.lang on login (GameEngine/Session.php,
  PopulateVar), so the chosen language applies right after logging in.

- Keep the SERVER default intact when an admin saves settings: the admin
  config regenerators and the "Server Settings"/config displays now use
  SERVER_LANG (the server default) instead of the per-user LANG, so an
  admin browsing in their own language can't accidentally overwrite the
  server default (6 Admin/Mods/edit*.php + editServerSet.tpl + config.tpl).

Note: existing installs must also add SERVER_LANG + the LANG resolution to
their generated GameEngine/config.php (and the Admin/Mods/constant_format.tpl
copy) since config is generated at install time.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 09:07:57 +02:00
novgorodschi catalin 11ce6e6052 Added Romanian Language
Added Romanian Language
2026-06-04 09:39:44 +03:00
TravianZ Patcher 2f2f0f5a47 Add Swiss timezone (Europe/Zurich) to timezone selectors
The timezone lists are hardcoded. Add "Europe (Switzerland)" =
Europe/Zurich to:
- Admin/Templates/editServerSet.tpl (admin: edit server settings)
- install/templates/config.tpl (install wizard, index 14)
- install/index.php (install wizard tz index->name mapping, case 14)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 11:28:09 +02:00
TravianZ Patcher 46d63e737c Add French (fr) to the language selectors
The language dropdowns are hardcoded (they don't scan GameEngine/Lang/),
so the existing fr.php never appeared. Add a French option to:
- install/templates/config.tpl (install wizard)
- Admin/Templates/editServerSet.tpl (admin: edit server settings)
- Admin/Templates/config.tpl (admin: server config display)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 11:28:09 +02:00
novgorodschi catalin a4e2c506a8 Redesign Admin Panel
Full frontend & backend redesign and refactor
2026-05-25 10:23:39 +03:00
iopietro b58b762b12 General Fixes
+Completely reworked the "removeBuilding" function, it's now more
generic (for future uses)
+Fixed a bug that bugged the master builder time when a building was
removed from the construction queue
+Fixed a bug that bugged building times when a building was removed from
the queue, with a master builder order queued
+Fixed a bug that didn't permit to save the server settings from the
+MH/Admin panel
+Fixed a bug that did save the WW spawn time in the WW building plan
spawn time and vice versa
+General improovements and bug fixing
2018-05-14 23:14:10 +02:00
Vladyslav f810c9fe99 Small edits of available languages 2018-04-22 23:54:03 +03:00
Vladyslav 2891abf977 Small fixes 2018-04-22 23:34:01 +03:00
Vladyslav 1b3f4eadd1 Added a peace system in the newsbox
+Added displaying a peace system to the newsbox.
Small fix in Admin\Templates\editServerSet.tpl
2018-04-13 14:48:27 +03:00
Vladyslav 4ecbfa77a0 Tooltip part 1 for admin panel settings
Partially added to the file Admin/Templates/config.tpl
Fully added to the file Admin/ Templates/editServerSet.tpl
Almost completely translated texts in en.php
2018-04-12 23:58:28 +03:00
Martin Ambrus 59b5d97dc0 fix: all languages added to installer and Admin 2017-11-27 16:14:23 +01:00
Martin Ambrus e3b46ed0d0 feat: Admin-configurable PLUS settings 2017-10-04 11:36:52 +02:00
Shadow c084e99771 Update editServerSet.tpl 2014-03-11 11:33:49 +02:00
Shadow b24a424a61 Update editServerSet.tpl 2014-03-10 09:16:24 +02:00
Shadow c73b8d1e84 Update editServerSet.tpl 2014-03-10 08:50:37 +02:00
Shadow d9e9a82200 fix 2014-03-10 08:42:13 +02:00
Shadow 15c6bb2fea Merge branch 'master' of https://github.com/Shadowss/TravianZ
Conflicts:
	Admin/Templates/config.tpl
	Admin/Templates/editServerSet.tpl
2014-03-10 08:39:06 +02:00
sempoi 00aae86239 Update editServerSet.tpl 2014-03-08 19:45:49 +08:00
sempoi 9f7de2e60c Update editServerSet.tpl 2014-03-08 16:01:30 +08:00
Shadow 902cc9b12e Update editServerSet.tpl 2014-02-26 08:22:35 +02:00
Shadow 923b4b3e18 updates admin 2014-02-26 07:38:09 +02:00