Update release script for both wow versions
This commit is contained in:
parent
8e20f9a218
commit
4b6bac21a0
7 changed files with 177 additions and 46 deletions
67
README_Vanilla.md
Executable file
67
README_Vanilla.md
Executable file
|
@ -0,0 +1,67 @@
|
|||
# Czech Quests
|
||||
|
||||
This addon aims to offer players the possibility to play the part of game in Czech language while also having access to
|
||||
the texts in English language.
|
||||
It can offer players who don't understood English quest description some help to understand how complete quests.
|
||||
|
||||
## Description
|
||||
|
||||
Display unofficial translations for quests in the player's quest log, as well as on the quest frames.
|
||||
|
||||
The translation is automatically visible next to the original text as tooltip.
|
||||
In case Quest Log, you need to hover over the quest text itself.
|
||||
|
||||
[//]: # (## Contribution)
|
||||
[//]: # ()
|
||||
[//]: # (Translations can be reported at [this link](https://czquests.romanjaros.cz) (only czech language).)
|
||||
|
||||
## Financial support
|
||||
|
||||
[](https://ko-fi.com/G2G210Y1M7)
|
||||
|
||||
If you like my work, I would be very happy for consider financial support.
|
||||
By supporting, you can also help to speed up the translation of the remaining parts + possible expand to other game
|
||||
expansions.
|
||||
|
||||
---
|
||||
|
||||
# České Questy
|
||||
|
||||
Cílem tohoto addonu je nabídnout hráčům možnost hrát část hry v češtině a zároveň mít přístup k textům v angličtině.
|
||||
Hráčům, kteří nerozumějí anglickému popisu úkolů, může nabídnout určitou pomoc, aby pochopili, jak úkoly plnit.
|
||||
|
||||
## Popisek
|
||||
|
||||
Zobrazení neoficiálních překladů úkolů v Quest logu hráče a vedle standartního zobrazení detailu úkolu.
|
||||
|
||||
Překlad se automaticky zobrazí vedle originálního textu jako nápověda.
|
||||
V případě deníku úkolů je třeba vybrat úkol a následně najet myší na samotný text úkolu.
|
||||
|
||||
[//]: # (## Pomoc s překladem)
|
||||
[//]: # ()
|
||||
[//]: # (Pokud narazíte na chybný překlad, mužete se přihlásit [tomto odkazu](https://czquests.romanjaros.cz) pomocí Battle.net)
|
||||
[//]: # (účtu (jako do wowka) a nahlásit co je špatně.)
|
||||
|
||||
## Finanční podpora
|
||||
|
||||
[](https://ko-fi.com/G2G210Y1M7)
|
||||
|
||||
Pokud se vám moje práce líbí, budu velmi rád, když zvážíte finanční podporu.
|
||||
Podporou také pomůžete urychlit překlad zbývajících dílů + případné rozšíření na další rozšíření hry.
|
||||
|
||||
---
|
||||
|
||||
# Progress of translations
|
||||
|
||||
#### TWW:
|
||||
|
||||
| name | verified | translated |
|
||||
|-------------------|----------|------------|
|
||||
| azj kahet | | |
|
||||
| city of threads | | |
|
||||
| dornogal | | |
|
||||
| hallowfall | | |
|
||||
| isle of dorn | | x |
|
||||
| nerub ar palace | | |
|
||||
| the ringing deeps | | |
|
||||
| warbands | | x |
|
154
release.sh
154
release.sh
|
@ -1,53 +1,117 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
# Define the file
|
||||
TOC_FILE="CzechQuests.toc"
|
||||
output_directory="CzechQuests"
|
||||
|
||||
if [[ -f "$TOC_FILE" ]]; then
|
||||
# Read version number from the file
|
||||
VERSION=$(grep "## Version:" "$TOC_FILE" | cut -d ' ' -f 3)
|
||||
echo "Version: $VERSION"
|
||||
else
|
||||
echo "File $TOC_FILE does not exist."
|
||||
fi
|
||||
|
||||
# Define the name of the zipfile
|
||||
ZIPFILE="czech-quests-v$VERSION.zip"
|
||||
|
||||
# Define the output directory
|
||||
OUT_DIR="CzechQuests"
|
||||
|
||||
# Create the output directory
|
||||
mkdir -p $OUT_DIR
|
||||
|
||||
# Define files/directories to copy
|
||||
FILES_TO_COPY="*"
|
||||
|
||||
# Define files/directories to exclude while copying
|
||||
# File names should be separated by space and wrapped in double quotes
|
||||
EXCLUDE_FILES=(
|
||||
".git"
|
||||
".idea"
|
||||
".png"
|
||||
".sh"
|
||||
"README.md"
|
||||
"czech-quest-v",
|
||||
"Data"
|
||||
$OUT_DIR
|
||||
wow_versions=(
|
||||
"Classic ERA" # 1 - classic_era
|
||||
"Retail" # 2 - retail
|
||||
)
|
||||
|
||||
# Copy files to the output directory
|
||||
for FILE in $FILES_TO_COPY
|
||||
do
|
||||
echo "Processing $FILE file..."
|
||||
if [[ ! " ${EXCLUDE_FILES[@]} " =~ " ${FILE} " ]]; then
|
||||
cp -r $FILE $OUT_DIR
|
||||
echo "Copied $FILE"
|
||||
toc_files=(
|
||||
"CzechQuests_Vanilla.toc"
|
||||
"CzechQuests_Mainline.toc"
|
||||
)
|
||||
|
||||
|
||||
read_toc_version() {
|
||||
local wow_version=$1
|
||||
local toc_file=${toc_files[$wow_version]}
|
||||
local current_version=0
|
||||
if [[ -f "$toc_file" ]]; then
|
||||
current_version=$(grep "## Version:" "$toc_file" | cut -d ' ' -f 3)
|
||||
fi
|
||||
echo "$current_version"
|
||||
}
|
||||
|
||||
write_toc_version() {
|
||||
local wow_version=$1
|
||||
local next_version=$2
|
||||
local toc_file=${toc_files[$wow_version]}
|
||||
if [[ -f "$toc_file" ]]; then
|
||||
sed -i '' "s/## Version: $current_version/## Version: $next_version/" "$toc_file"
|
||||
fi
|
||||
}
|
||||
|
||||
make_zip() {
|
||||
local wow_version=$1
|
||||
local current_version=$2
|
||||
|
||||
local zip_filename=""
|
||||
local files_to_zip=()
|
||||
|
||||
# prepare output directory
|
||||
mkdir -p $output_directory
|
||||
mkdir -p "${output_directory}/Quests/Data/"
|
||||
|
||||
# Includes classic era continents
|
||||
if [ "$wow_version" = "1" ]; then
|
||||
cp -r "./Quests/Data/classic_era/" "${output_directory}/Quests/Data/"
|
||||
cp "./CzechQuests_Vanilla.toc" "${output_directory}"
|
||||
zip_filename="czech-quests-classic_era-v$current_version.zip"
|
||||
fi
|
||||
|
||||
# Includes retail continents
|
||||
if [ "$wow_version" = "2" ]; then
|
||||
cp -r "./Quests/Data/retail/" "${output_directory}/Quests/Data/"
|
||||
cp "./CzechQuests_Mainline.toc" "${output_directory}"
|
||||
zip_filename="czech-quests-retail-v$current_version.zip"
|
||||
fi
|
||||
|
||||
# includes frames
|
||||
while IFS= read -r line; do
|
||||
files_to_zip+=("$line")
|
||||
done < <(find . -name "*.lua" -path "./Quests/Frames/*")
|
||||
|
||||
# includes other files
|
||||
files_to_zip+=("./Quests/Data/other.lua" "./Quests/Quests.lua" "./Quests/Utils.lua" "./Init.lua")
|
||||
files_to_zip+=("./morpheus_cz.ttf" "./frizquadratatt_cz.ttf")
|
||||
|
||||
# prepare output directory
|
||||
for file in "${files_to_zip[@]}"; do
|
||||
rsync -R "$file" $output_directory
|
||||
done
|
||||
|
||||
# Create the zip file at parent level, including the 'dist' directory
|
||||
zip -r $ZIPFILE $OUT_DIR
|
||||
# create zip file
|
||||
zip -r "$zip_filename" $output_directory
|
||||
|
||||
# Optionally, remove the copied unzipped files in 'dist'
|
||||
rm -rf $OUT_DIR
|
||||
# remove output directory
|
||||
rm -r $output_directory
|
||||
}
|
||||
|
||||
release_wow() {
|
||||
local wow_version=$1
|
||||
|
||||
# Read current version from file for wow version
|
||||
current_version=$(read_toc_version "$wow_version")
|
||||
|
||||
# Increase version
|
||||
new_version="$current_version"
|
||||
vared -p "Choose version: " new_version
|
||||
|
||||
# Write to file
|
||||
write_toc_version "$wow_version" "$new_version"
|
||||
|
||||
# Generate zip
|
||||
make_zip $wow_version $current_version
|
||||
}
|
||||
|
||||
init() {
|
||||
echo "Choose Wow:"
|
||||
select opt in "${wow_versions[@]}"
|
||||
do
|
||||
case $opt in
|
||||
"Classic ERA")
|
||||
echo "You chose Classic ERA"
|
||||
release_wow 1
|
||||
return 0
|
||||
;;
|
||||
"Retail")
|
||||
echo "You chose Retail"
|
||||
release_wow 2
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
init
|
Loading…
Add table
Reference in a new issue