Garry's Mod

Garry's Mod

[KMAS] Kaito's Mortar and Artillery System
 This topic has been pinned, so it's probably important
Shi / Kaito  [developer] 27 Oct @ 2:59pm
Translation guide
KMAS Translation Guide / Guide de Traduction

This guide explains how to translate the KMAS addon into other languages.
Ce guide explique comment traduire l'addon KMAS dans d'autres langues.




Available Translations / Traductions Disponibles

🇫🇷 French version already available here:
KMAS - Artillerie & Mortier (FR)
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3590910583




How to Create a Translation / Comment Créer une Traduction

The KMAS addon uses a centralized language system that makes translations easy to implement.
L'addon KMAS utilise un système de langue centralisé qui facilite la mise en place de traductions.

Step 1: Create the translation file / Étape 1 : Créer le fichier de traduction

Create a new Lua file in your addon's
lua/autorun/
folder.
Créez un nouveau fichier Lua dans le dossier
lua/autorun/
de votre addon.

Example filename / Exemple de nom de fichier:
sh_kmas_lang_spanish.lua

Step 2: Use the template / Étape 2 : Utiliser le modèle

Copy this template and modify the values to your target language:
Copiez ce modèle et modifiez les valeurs dans votre langue cible:

hook.Add("Initialize", "kmas.hooks.Initialize.loadYourLanguageTranslation", function() timer.Simple(15, function() KMAS.Lang.MortarHUD = { calculator_title = "Coordinate Calculator", calculator_target_x = "Target X:", calculator_target_y = "Target Y:", calculator_target_z = "Target Z:", calculator_button = "Calculate", calculator_invalid_coords = "[Mortar] Invalid coordinates", calculator_prefix = "[Mortar Calculator] ", calculator_on_target = "ON TARGET", calculator_move_right = "MOVE RIGHT %d DEGREES", calculator_move_left = "MOVE LEFT %d DEGREES", calculator_result = "%s, HEADING %.0f°, DISTANCE %.0fm", cardinal_n = "N", cardinal_ne = "NE", cardinal_e = "E", cardinal_se = "SE", cardinal_s = "S", cardinal_sw = "SW", cardinal_w = "W", cardinal_nw = "NW", elevation_title = "ELEVATION", elevation_meters = "%dm", elevation_milliradians = "%dmil", elevation_angle = "%.1f°", controls_text = "CONTROLS: A/D = Azimuth | W/S = Elevation | SPACE = Fire | CTRL = Toggle View | R = Reload | ALT = Calculator", ammunition_label = "AMMUNITION: %s", flight_time_label = "FLIGHT TIME: 14-16s", dispersion_label = "DISPERSION: 0-10m", reserve_label = "RESERVE: %d ressources", unknown_ammo = "Unknown" } KMAS.Lang.Rangefinder = { coordinates_label = "Coordinates : %.0f %.0f %.0f", distance_label = "DISTANCE: %.0fm", azimuth_label = "AZIMUTH: %.0f° [%s]", player_in_mortar = " [IN MORTAR]:", player_on_foot = ":", range_label = " Range: %.0fm", turn_right_label = " Turn RIGHT %d°", turn_left_label = " Turn LEFT %d°", on_target_label = " ON TARGET", distance_to_target_label = " Distance to target: %.0fm", azimuth_to_target_label = " Azimuth to target: %.0f°", selection_title = "Observer Selection", selection_subtitle = "Select players to observe:", status_in_mortar = "IN MORTAR", status_on_foot = "On foot", button_apply = "Apply", button_select_all = "Select All", button_deselect_all = "Deselect All", } KMAS.Lang.ArtilleryTool = { instruction_configure = "[LEFT CLICK] Configure Strike", instruction_call_strike = "[R] Call Strike at Crosshair", instruction_manual_coords = "[E] Manual Coordinates Entry", current_config_label = "Current Config: %s | %s | %s", projected_timings_title = "PROJECTED TIMINGS", projected_impact_label = "Impact: ~%s", projected_reload_label = "Reload: ~%s", coordinates_display = "Coordinates : %.0f %.0f %.0f", distance_display = "DISTANCE: %.0fm", strike_inbound_title = "STRIKE INBOUND", distance_from_you_label = "Distance from you : %.0fm", seconds_label = "SECONDS", target_label = "Target: %.0f, %.0f, %.0f", cancel_strike_button = "[R] CANCEL STRIKE", cancel_available_in = "Cancel available in %s", impact_time_label = "IMPACT TIME", reload_status_label = "RELOAD STATUS", chat_prefix = "[KMAS Artillery] ", chat_configured = "Configured: %s %s %s", chat_strike_cancelled = "Strike cancelled", chat_strike_called = "Strike called at X:%.0f Y:%.0f Z:%.0f", chat_invalid_coordinates = "Please enter valid numbers for all coordinates", manual_coords_title = "Manual Coordinates Entry", manual_coords_warning = "WARNING: Strike will be sent IMMEDIATELY upon confirmation.\nEnsure strike type is configured BEFORE entering coordinates.", coord_x_label = "X:", coord_y_label = "Y:", coord_z_label = "Z:", coord_x_placeholder = "Enter X coordinate", coord_y_placeholder = "Enter Y coordinate", coord_z_placeholder = "Enter Z coordinate", button_confirm_strike = "Confirm Strike", button_cancel = "Cancel", menu_artillery_155 = "Artillery 155mm", menu_artillery_155_desc = "Long-range heavy artillery strikes", menu_mortar_88 = "Mortar 88mm", menu_mortar_88_desc = "Close-range mortar support", munition_he = "HE", munition_he_full = "High-explosive rounds", munition_smoke = "Smoke", munition_smoke_full = "Smoke screen coverage", munition_incendiary = "Incendiary", munition_incendiary_full = "Napalm bombardment", munition_flare = "Flare", munition_flare_full = "Illumination support", munition_wp = "White Phosphorus", munition_wp_full = "Incendiary area denial", fire_mode_single = "Single", fire_mode_single_desc = "Single precise strike", fire_mode_salvo = "Salvo", fire_mode_salvo_desc = "Multiple strikes in quick succession", fire_mode_continuous = "Continuous", fire_mode_continuous_desc = "Sustained barrage", target_zone_label = "Artillery Target Zone", } KMAS.Lang.MortarErrors = { cannot_pickup_in_use = "Cannot pickup mortar while someone is using it", front_clearance_insufficient = "Front clearance insufficient - need %dm clear space (only %.1fm available)", vertical_clearance_insufficient = "Insufficient vertical clearance - need %dm, have %.1fm", insufficient_ammunition = "Insufficient ammunition - need %d resources, have %d", player_blocking_barrel = "Shot cancelled - player %s is blocking the barrel", obstacle_blocking_barrel = "Shot cancelled - obstacle blocking barrel (%s)", obstacle_blocking_barrel_world = "Shot cancelled - obstacle blocking barrel", out_of_map_bounds = "Shot cancelled - intended trajectory goes out of map bounds", obstacle_in_clearance_zone = "Shot cancelled - obstacle at %.1fm (need %s frontal clearance)", aberrant_impact_position = "Shot cancelled - aberrant impact position detected", obstacle_hit_warning = "Obstacle hit - ask your spotter to confirm impact", } KMAS.Lang.MortarConstructor = { invalid_ground = "You must aim at valid ground to place the mortar", too_far = "Too far! Maximum placement distance: %dm (current: %.1fm)", surface_too_steep = "Surface too steep to place mortar", placed_infinite = "Mortar (Infinite) placed successfully", placed_finite_with_ammo = "Mortar (Finite) placed with %d resources", placed_finite = "Mortar (Finite) placed successfully", picked_up_infinite = "Mortar (Infinite) picked up", picked_up_finite_with_ammo = "Mortar (Finite) picked up with %d resources stored", picked_up_finite = "Mortar (Finite) picked up", already_have_constructor = "You already have a mortar constructor", } KMAS.Lang.MortarShells = { mortar_he = "Mortar HE Shell", mortar_smoke = "Mortar Smoke Shell", mortar_fire = "Mortar Fire Shell", mortar_flare = "Mortar Flare Shell", mortar_wp = "Mortar White Phosphorus Shell", cost_label = "Cost: %.1f", } KMAS.Lang.ResourceCrates = { ammo_added = "You added %d resources to the mortar's reserve. Current reserve: %d resources.", small_crate = "SMALL CRATE", medium_crate = "MEDIUM CRATE", big_crate = "BIG CRATE", resources_label = "%d RESOURCES", } print("[KMAS] YOUR LANGUAGE translations loaded successfully (Author: YOUR NAME)") end) end)




Important Notes / Notes Importantes

  • Do NOT modify the
    %s
    ,
    %d
    ,
    %.0f
    format specifiers - they are placeholders for dynamic values
    NE MODIFIEZ PAS les spécificateurs
    %s
    ,
    %d
    ,
    %.0f
    - ce sont des emplacements pour les valeurs dynamiques

  • The 15-second delay in
    timer.Simple(15, ...)
    ensures KMAS loads before applying translations
    Le délai de 15 secondes dans
    timer.Simple(15, ...)
    assure que KMAS se charge avant d'appliquer les traductions

  • Test your translation thoroughly before publishing
    Testez votre traduction en profondeur avant de publier




Sharing Your Translation / Partager Votre Traduction

We encourage you to contact the author before publishing your translation!
Nous vous encourageons à contacter l'auteur avant de publier votre traduction !

The author can either:
L'auteur peut soit:

  • Upload the translation pack themselves under their Steam ID
    Uploader le pack de traduction lui-même sous son Steam ID

  • Add your translation to the official KMAS Language Pack collection
    Ajouter votre traduction à la collection officielle des packs de langues KMAS

This helps maintain quality and ensures all translations are easily discoverable by users.
Cela aide à maintenir la qualité et assure que toutes les traductions sont facilement trouvables par les utilisateurs.

Contact / Steam Profile:
Kaito's Steam Profile




Reference: French Translation Example / Référence : Exemple de Traduction Française

For a complete working example, check the official French translation:
Pour un exemple complet fonctionnel, consultez la traduction française officielle:

KMAS - Artillerie & Mortier (FR)
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3590910583