Skip to content

Commit

Permalink
Fix warnings in update_pot.sh (CleverRaven#46294)
Browse files Browse the repository at this point in the history
* Fix warnings from extract_json_strings.py

* Fix msgfmt warnings

* Update data/json/overmap/overmap_terrain/overmap_terrain_necropolis.json
  • Loading branch information
Qrox authored Dec 24, 2020
1 parent cc23208 commit e493723
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 7 deletions.
3 changes: 2 additions & 1 deletion data/json/overmap/overmap_land_use_codes.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"type": "overmap_land_use_code",
"id": "",
"sym": "#",
"color": "white"
"color": "white",
"detailed_definition": ""
},
{
"type": "overmap_land_use_code",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@
{
"type": "overmap_terrain",
"abstract": "generic_necropolis_underground",
"name": "underground",
"color": "yellow",
"see_cost": 999,
"mondensity": 2
Expand Down
6 changes: 4 additions & 2 deletions data/json/species.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@
},
{
"type": "SPECIES",
"id": "HALLUCINATION"
"id": "HALLUCINATION",
"description": "your imagination"
},
{
"type": "SPECIES",
Expand All @@ -146,6 +147,7 @@
},
{
"type": "SPECIES",
"id": "UNKNOWN"
"id": "UNKNOWN",
"description": "a bug"
}
]
3 changes: 2 additions & 1 deletion data/mods/DinoMod/monsters/dinosaur.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"type": "SPECIES",
"id": "DINOSAUR",
"//": "Capping these at 1000 L and kg to prevent bodies and meat disappearing and vision at 50 for less aggro",
"fear_triggers": [ "FIRE" ]
"fear_triggers": [ "FIRE" ],
"description": "A dinosaur."
},
{
"type": "MONSTER",
Expand Down
1 change: 1 addition & 0 deletions data/mods/Magiclysm/monsters/demon_spider.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{
"type": "SPECIES",
"id": "DEMON_SPIDER",
"description": "A huge spider.",
"anger_triggers": [ "FRIEND_DIED", "HURT", "PLAYER_CLOSE", "PLAYER_WEAK" ]
},
{
Expand Down
6 changes: 5 additions & 1 deletion data/mods/Magiclysm/species.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
[
{
"type": "SPECIES",
"id": "MAGICAL_BEAST"
"id": "MAGICAL_BEAST",
"description": "A magical beast."
},
{
"type": "SPECIES",
"id": "DRAGON",
"description": "A dragon.",
"anger_triggers": [ "HURT", "PLAYER_CLOSE", "PLAYER_WEAK", "STALK" ]
},
{
"type": "SPECIES",
"id": "LIZARDFOLK",
"description": "A lizard-like humanoid.",
"anger_triggers": [ "FRIEND_ATTACKED" ],
"fear_triggers": [ "FIRE" ]
},
{
"type": "SPECIES",
"id": "GOBLIN",
"description": "A short and cruel humanoid.",
"anger_triggers": [ "HURT", "FRIEND_ATTACKED", "PLAYER_WEAK" ]
}
]
4 changes: 3 additions & 1 deletion lang/extract_json_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,17 @@ def __str__(self):
# no warning will be given if an untranslatable object is found in those files
warning_suppressed_list = {os.path.normpath(i) for i in {
"data/json/flags.json",
"data/json/npcs/npc.json",
"data/json/overmap_terrain.json",
"data/json/statistics.json",
"data/json/traps.json",
"data/json/vehicleparts/",
"data/raw/keybindings.json",
"data/mods/alt_map_key/overmap_terrain.json",
"data/mods/DeoxyMod/Deoxy_vehicle_parts.json",
"data/mods/More_Survival_Tools/start_locations.json",
"data/mods/NPC_Traits/npc_classes.json",
"data/mods/Tanks/monsters.json"
"data/mods/Tanks/monsters.json",
}}


Expand Down
7 changes: 6 additions & 1 deletion lang/update_pot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ then
pot_file="lang/po/cataclysm-dda.pot"
sed -e "1,6d" \
-e "s/^\"Project-Id-Version:.*\"$/\"Project-Id-Version: $package $version\\\n\"/1" \
-e "/\"Plural-Forms:.*\"$/d" $pot_file > $pot_file.temp
-e "/\"Plural-Forms:.*\"$/d" \
-e "s/^\"PO-Revision-Date:.*\"$/\"PO-Revision-Date: $(date +%Y-%m-%d\\\ %H:%M%z)\\\n\"/1" \
-e "s/^\"Last-Translator:.*\"$/\"Last-Translator: None\\\n\"/1" \
-e "s/^\"Language-Team:.*\"$/\"Language-Team: None\\\n\"/1" \
-e "s/^\"Language:.*\"$/\"Language: en\\\n\"/1" \
$pot_file > $pot_file.temp
mv $pot_file.temp $pot_file
fi

Expand Down

0 comments on commit e493723

Please sign in to comment.