From e5bf51300bce437c2d700ef94a6f9447d04b466b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hora=C8=9Biu=20Mlendea?= Date: Thu, 23 May 2024 13:19:12 +0300 Subject: [PATCH 1/3] ir: Linked more locations --- locations.xml | 395 ++++++++++++++++++++++++++++ scripts/update-location-links/ir.sh | 7 +- 2 files changed, 401 insertions(+), 1 deletion(-) diff --git a/locations.xml b/locations.xml index 8a492801..296eabf3 100644 --- a/locations.xml +++ b/locations.xml @@ -343445,6 +343445,7 @@ b_aba b_aba b_aba + 3385 @@ -432139,6 +432140,7 @@ abha b_abha + 3479 2281 @@ -525410,4 +525412,397 @@ k_sakya + + athymbra + + 1962 + + + + + + + + magnesia_pros_maiandro + + 1969 + + + + + + + + stratonikeia + + 1980 + + + + + + + + + kremna + + 1988 + + + + + + + + xanthos + + 1995 + + + + + + + + herakleous_akron + + 2002 + + + + + + + + noviodunum + + 2219 + + + + + + + + frigidae + + 3065 + + + + + + + + + + banasa + + 3070 + + + + + + + + + + rusazus + + 3123 + + + + + + + + + + uthina + + 3250 + + + + + + + + + utica + + 3257 + + + + + + + + + + thisika + + 3261 + + + + + + + + + + septimia + + 3264 + + + + + + + + + + leptis_minor + + 3277 + + + + + + + + + + vicus_augusti + + 3279 + + + + + + + + + acholla + + 3280 + + + + + + + + + + cercina + + 3284 + + + + + + + + + + macomades_minores + + 3288 + + + + + + + + + kinyps + + 3324 + + + + + + + + arae_philaenorum + + 3338 + + + + + + + + mendrion + + 3340 + + + + + + + + serapeion + + 3344 + + + + + + + + chairekla + + 3351 + + + + + + + + taucheira + + 3353 + + + + + + + + + apollonia_kyrenaike + + 3361 + + + apollonia + + + + + + + + paliouros + + 3366 + + + + + + + + batrachos + + 3368 + + + + + + + + kyrthanion + + 3371 + + + + + + + + menelaos + + 3372 + + + + + + + + nesus + + 3374 + + + + + + + + chettaia + + 3375 + + + + + + + + kallias + + 3379 + + + + + + + + leuke_akte_kyrenaike + + 3380 + + + + + + + + oktapitaron_akron + + 2099 + + + + + + + aquae_sirenses + + 3098 + + + + + + + noviomagus_durotrigiorum + + 2017 + + + + + diff --git a/scripts/update-location-links/ir.sh b/scripts/update-location-links/ir.sh index cad7835a..75c3a63e 100644 --- a/scripts/update-location-links/ir.sh +++ b/scripts/update-location-links/ir.sh @@ -31,6 +31,7 @@ function getProvinces() { sed -i 's/^\([0-9]*\)_aaa=\(.*\)/ <\/Names>\n <\/LocationEntity>\n \n \2<\/Id>\n \n \1<\/GameId> \n <\/GameIds>\n /g' "${OUTPUT_FILE}" sed -i 's/\([^<]*\)/\L\1/g' "${OUTPUT_FILE}" + sed -i 's/\([^<]*\)'"'"'/\1/g' "${OUTPUT_FILE}" sed -i '//s/ /_/g' "${OUTPUT_FILE}" sed -i 's/^____/ /g' "${OUTPUT_FILE}" @@ -66,8 +67,10 @@ function getProvinces() { mv "${OUTPUT_FILE}.tmp" "${OUTPUT_FILE}" for LOCATION_ID in $(grep "" "${OUTPUT_FILE}" | sed 's/\s*\(.*\)<\/Id>.*/\1/g' | sort | uniq); do - if grep -q "${LOCATION_ID}" "${LOCATIONS_FILE}"; then + if [ -n "$(xmlstarlet sel -t -m '//LocationEntity[Id='"'${LOCATION_ID}'"']' -v 'Id' -n ${LOCATIONS_FILE})" ]; then echo " > ${GAME}: ${LOCATION_ID} could potentially be linked" + elif [ -n "$(xmlstarlet sel -t -m '//LocationEntity[Id='"'${LOCATION_ID}'"']' -v 'Id' -n ${UNUSED_LOCATIONS_FILE})" ]; then + echo " > ${GAME}: ${LOCATION_ID} (unused) could potentially be linked" fi done @@ -75,6 +78,8 @@ function getProvinces() { LOCATION_NAME=$(echo "${LOCATION_NAME}" | sed 's/@/ /g') if grep -q "value=\"${LOCATION_NAME}\"" "${LOCATIONS_FILE}"; then echo " > ${GAME}: '${LOCATION_NAME}' could potentially be linked" + elif grep -q "value=\"${LOCATION_NAME}\"" "${UNUSED_LOCATIONS_FILE}"; then + echo " > ${GAME}: '${LOCATION_NAME}' (unused) could potentially be linked" fi done } From fb1fe35fc9bddb8a59e23bb0d6925e1d22dee60f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hora=C8=9Biu=20Mlendea?= Date: Thu, 23 May 2024 13:24:39 +0300 Subject: [PATCH 2/3] ir: Linked more languages --- languages.xml | 5 +++++ scripts/get-unlinked-languages.sh | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/languages.xml b/languages.xml index 8df0aaf9..2fbc4bd5 100644 --- a/languages.xml +++ b/languages.xml @@ -93618,6 +93618,9 @@ Gandhari + + gandhari + Gaulish @@ -156513,6 +156516,7 @@ Lusitanian + lusitanian lusitanian @@ -159774,6 +159778,7 @@ Messapic + messapian messapian diff --git a/scripts/get-unlinked-languages.sh b/scripts/get-unlinked-languages.sh index 578c3485..f50945b5 100644 --- a/scripts/get-unlinked-languages.sh +++ b/scripts/get-unlinked-languages.sh @@ -134,11 +134,17 @@ function getIrCultures() { grep "^\s*\"" | \ sed 's/^\s*\"\([^\"]*\).*/\1/g'); do if ! grep -q ''${CULTURE_ID}'' "${LANGUAGES_FILE}"; then + if grep -qi 'Id>.*\b'"${CULTURE_ID}" "${LANGUAGES_FILE}"; then + echo " > ${GAME_ID}: Language with GameId ${CULTURE_ID} is missing could potentially be linked to an existing one" + elif grep -qi 'Id>.*\b'"${CULTURE_ID}" "${UNUSED_LANGUAGES_FILE}"; then + echo " > ${GAME_ID}: Language with GameId ${CULTURE_ID} is missing could potentially be linked to an existing unused one" + fi + echo " ${CULTURE_ID}" fi done done - done | sort | uniq + done } echo "Crusader Kings 2:" && getCk2Cultures "CK2" "${CK2_CULTURES_DIR}" From 8d73cf4a83ebc05ea8e036070ac38026b436ad9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hora=C8=9Biu=20Mlendea?= Date: Thu, 23 May 2024 13:27:44 +0300 Subject: [PATCH 3/3] ir: Fixed typo --- locations.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locations.xml b/locations.xml index 296eabf3..a11cb902 100644 --- a/locations.xml +++ b/locations.xml @@ -525745,7 +525745,7 @@ - +