Skip to content

Commit

Permalink
Merge pull request #120 from 0xzer0x/release/1.3.2
Browse files Browse the repository at this point in the history
v1.3.2
  • Loading branch information
0xzer0x authored Nov 18, 2024
2 parents c9ca3e7 + 1576bdb commit 27e5877
Show file tree
Hide file tree
Showing 45 changed files with 1,356 additions and 2,535 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ jobs:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
aqtversion: "==3.1.*"
version: "6.7.*"
aqtversion: ==3.1.*
version: 6.8.0
host: linux
target: desktop
arch: linux_gcc_64
Expand Down Expand Up @@ -155,8 +155,8 @@ jobs:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
aqtversion: "==3.1.*"
version: "6.7.*"
aqtversion: ==3.1.*
version: 6.8.0
host: "mac"
cache: true
target: "desktop"
Expand Down
18 changes: 14 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,22 @@

### التحديثات 💭

- إضافة الترجمة الإندونيسية لواجهة البرنامج
- تحديث Qt للإصدار 6.7
- تصليح عطل في ترجمة أسماء التفاسير
- تصليح بعض الأعطال عند استخدام خط QCF v2 (#113)
- إضافة خط الآيات لرواية ورش عن نافع (#115)
- إضافة القارئ إبراهيم الدوسري (ورش) (#115)
- إضافة القارئ ياسين الجزائري (ورش) (#115)
- إضافة تذكر حالة شريط القوائم (مرئي/مخفي) (#114)
- تحديث Qt للإصدار 6.8

</div>

### What's Changed 💭

- Added Indonesian UI translation
- Upgrade to Qt 6.7
- Bug fix for issue with the translation of Tafsir names
- Bug fixes for QCF v2 font (#113)
- Added the Ayat font for Warsh 'an Nafi' narration (#115)
- New reciter Ibrahim Al-Dosari (Warsh) (#115)
- New reciter Yassine Al-Jazairi (Warsh) (#115)
- Added saving of the state of the menu bar (visible/hidden) (#114)
- Updating Qt to version 6.8
22 changes: 3 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.22)
project(
quran-companion
LANGUAGES CXX
VERSION 1.3.1
VERSION 1.3.2
DESCRIPTION "Quran reader and player"
HOMEPAGE_URL "https://0xzer0x.github.io/projects/quran-companion/")

Expand Down Expand Up @@ -153,6 +153,8 @@ set(PROJECT_SOURCES
src/notifiers/jobnotifier.cpp
src/utils/configuration.h
src/utils/configuration.cpp
src/utils/configurationschema.h
src/utils/configurationschema.cpp
src/utils/shortcuthandler.h
src/utils/shortcuthandler.cpp
src/utils/logger.h
Expand Down Expand Up @@ -264,28 +266,10 @@ list(APPEND SUPPORTED_LANGUAGES ar tr ru id)
foreach(lang IN LISTS SUPPORTED_LANGUAGES)
message(STATUS "Adding ${lang} translation file to QC_TS")
list(APPEND QC_TS "dist/translations/out/qc_${lang}.ts")

if(EXISTS "dist/translations/qtbase/${lang}.qm")
message(STATUS "Copying ${lang} qt translations to build tree")
configure_file("dist/translations/qtbase/${lang}.qm"
"${CMAKE_BINARY_DIR}/${lang}.qm" COPYONLY)

message(STATUS "Adding ${lang} qtbase qm file to QTBASE_QM")
list(APPEND QTBASE_QM "${CMAKE_BINARY_DIR}/${lang}.qm")
endif()
endforeach()

message(STATUS "Creating qt translations resource file")
qt_add_translations(quran-companion TS_FILES ${QC_TS})
qt_add_resources(
quran-companion
"qttranslations"
PREFIX
"/qtbase"
BASE
${CMAKE_BINARY_DIR}
FILES
${QTBASE_QM})

if(QT_VERSION_MAJOR EQUAL 6)
qt_finalize_executable(quran-companion)
Expand Down
4 changes: 2 additions & 2 deletions README-AR.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
<a href='https://flathub.org/apps/io.github._0xzer0x.qurancompanion'>
<img width='240' alt='Download Flatpak' src='https://dl.flathub.org/assets/badges/flathub-badge-en.svg'/>
</a>
<a href='https://github.com/0xzer0x/quran-companion/releases/download/v1.3.1/Quran_Companion-1.3.1-x86_64.AppImage'>
<a href='https://github.com/0xzer0x/quran-companion/releases/download/v1.3.2/Quran_Companion-1.3.2-x86_64.AppImage'>
<img width='260' alt='Download AppImage' src='https://docs.appimage.org/_images/download-appimage-banner.svg' style='border-radius: 10px'/>
</a>
<a href="https://snapcraft.io/quran-companion">
Expand Down Expand Up @@ -329,4 +329,4 @@ cmake --build .
[win-installer]: https://github.com/0xzer0x/quran-companion/releases/download/v1.1.9/qc_online_installer_x64_win.exe
[translation-wiki]: https://github.com/0xzer0x/quran-companion/wiki/Contributing-Translations
[recitations-wiki]: https://github.com/0xzer0x/quran-companion/wiki/Contributing-Recitations
[macos-dmg-url]: https://github.com/0xzer0x/quran-companion/releases/download/v1.3.1/Quran_Companion-1.3.1-x86_64.dmg
[macos-dmg-url]: https://github.com/0xzer0x/quran-companion/releases/download/v1.3.2/Quran_Companion-1.3.2-x86_64.dmg
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ The application can be downloaded in any of the available packages (snap, flatpa
<a href='https://flathub.org/apps/io.github._0xzer0x.qurancompanion'>
<img width='240' alt='Download Flatpak' src='https://dl.flathub.org/assets/badges/flathub-badge-en.svg'/>
</a>
<a href='https://github.com/0xzer0x/quran-companion/releases/download/v1.3.1/Quran_Companion-1.3.1-x86_64.AppImage'>
<a href='https://github.com/0xzer0x/quran-companion/releases/download/v1.3.2/Quran_Companion-1.3.2-x86_64.AppImage'>
<img width='260' alt='Download AppImage' src='https://docs.appimage.org/_images/download-appimage-banner.svg' style='border-radius: 10px'/>
</a>
<a href="https://snapcraft.io/quran-companion">
Expand Down Expand Up @@ -311,4 +311,4 @@ Distributed under the [Waqf General Public License](https://ojuba.org/waqf-2.0:%
[win-installer]: https://github.com/0xzer0x/quran-companion/releases/download/v1.1.9/qc_online_installer_x64_win.exe
[translation-wiki]: https://github.com/0xzer0x/quran-companion/wiki/Contributing-Translations
[recitations-wiki]: https://github.com/0xzer0x/quran-companion/wiki/Contributing-Recitations
[macos-dmg-url]: https://github.com/0xzer0x/quran-companion/releases/download/v1.3.1/Quran_Companion-1.3.1-x86_64.dmg
[macos-dmg-url]: https://github.com/0xzer0x/quran-companion/releases/download/v1.3.2/Quran_Companion-1.3.2-x86_64.dmg
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.1
1.3.2
Binary file added assets/fonts/uthmanic_warsh_v21.ttf
Binary file not shown.
Binary file modified assets/quran.db
Binary file not shown.
Binary file added bismillah/warsh-ibrahim-aldosary.mp3
Binary file not shown.
Binary file added bismillah/warsh-yassin-al-jazaery.mp3
Binary file not shown.
53 changes: 28 additions & 25 deletions dist/translations/generate-template
Original file line number Diff line number Diff line change
Expand Up @@ -5,62 +5,64 @@ set -euo pipefail
_SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
_QT_DIR=$(find "$HOME" -maxdepth 3 -path "$HOME/Qt/6.*/gcc_64" -type d | head -n 1)
#COLORS
CDEF="\033[0m" # default color
b_CCIN="\033[1;36m" # bold info color
b_CGSC="\033[1;32m" # bold success color
b_CRER="\033[1;31m" # bold error color
b_CWAR="\033[1;33m" # bold warning color
__CDEF="\033[0m" # default color
__b_CCIN="\033[1;36m" # bold info color
__b_CGSC="\033[1;32m" # bold success color
__b_CRER="\033[1;31m" # bold error color
__b_CWAR="\033[1;33m" # bold warning color

# echo like with flag type and display message colors
prompt() {
__prompt() {
case ${1} in
"-s" | "--success")
echo -ne "${b_CGSC}${2}${CDEF}"
echo -e "${__b_CGSC}${2}${__CDEF}"
;; # print success message
"-e" | "--error")
echo -ne "${b_CRER}${2}${CDEF}"
echo -e "${__b_CRER}${2}${__CDEF}"
;; # print error message
"-w" | "--warning")
echo -ne "${b_CWAR}${2}${CDEF}"
echo -e "${__b_CWAR}${2}${__CDEF}"
;; # print warning message
"-i" | "--info")
echo -ne "${b_CCIN}${2}${CDEF}"
echo -e "${__b_CCIN}${2}${__CDEF}"
;; # print info message
*)
echo -ne "$@"
echo -e "$@"
;;
esac
}

extract-reciters() {
prompt -s "-- generating reciters ts file\n"
local __tsfile=$_SCRIPT_DIR/generated/tafasir.ts
local __xmlfile=$_SCRIPT_DIR/../../resources/files.xml
__prompt -s "-- generating reciters ts file"
local __tsfile=$_SCRIPT_DIR/generated/reciters.ts
local __xmlfile=$_SCRIPT_DIR/../../resources/reciters.xml

mapfile -t __reciters_names <<<"$(awk -F'"' '/name/ { for(i=1;i<NF;i++) if($i~/tafsir name=/) { print $(i+1) } }' "$__xmlfile")"
mapfile -t __reciters_names <<<"$(grep -oE 'display="([^"]+)"' "${__xmlfile}" | cut -d'"' -f2)"

printf "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE TS>\n<TS version=\"2.1\">\n" >"$__tsfile"
printf "<context>\n\t<name>MainWindow</name>" >>"$__tsfile"
printf "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE TS>\n<TS version=\"2.1\">\n" >"${__tsfile}"
printf "<context>\n\t<name>MainWindow</name>" >>"${__tsfile}"

for n in "${__reciters_names[@]}"; do
printf "\n\t<message>\n\t\t<location filename=\"../main.cpp\"/>\n\t\t<source>%s</source>\n\t\t<translation type=\"unfinished\"></translation>\n\t</message>" "$n" >>"$__tsfile"
__prompt -i "-- adding '${n}'"
printf "\n\t<message>\n\t\t<location filename=\"../main.cpp\"/>\n\t\t<source>%s</source>\n\t\t<translation type=\"unfinished\"></translation>\n\t</message>" "$n" >>"${__tsfile}"
done

printf "\n</context>\n</TS>" >>"$__tsfile"
printf "\n</context>\n</TS>" >>"${__tsfile}"
echo "-- extracted ${#__reciters_names[@]} reciters"
}

extract-tafasir() {
prompt -s "-- generating tafasir ts file\n"
__prompt -s "-- generating tafasir ts file"
local __tsfile=$_SCRIPT_DIR/generated/tafasir.ts
local __xmlfile=$_SCRIPT_DIR/../../resources/files.xml

mapfile -t __tafasir_names <<<"$(awk -F'"' '/name/ { for(i=1;i<NF;i++) if($i~/tafsir name=/) { print $(i+1) } }' "$__xmlfile")"
mapfile -t __tafasir_names <<<"$(grep -oE 'tafsir.*name="([^"]+)"' "${__xmlfile}" | cut -d'"' -f6)"

printf "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE TS>\n<TS version=\"2.1\">\n" >"$__tsfile"
printf "<context>\n\t<name>MainWindow</name>" >>"$__tsfile"

for n in "${__tafasir_names[@]}"; do
__prompt -i "-- adding '${n}'"
printf "\n\t<message>\n\t\t<location filename=\"../main.cpp\"/>\n\t\t<source>%s</source>\n\t\t<translation type=\"unfinished\"></translation>\n\t</message>" "$n" >>"$__tsfile"
done

Expand All @@ -69,16 +71,17 @@ extract-tafasir() {
}

extract-shortcuts() {
prompt -s "-- generating shortcuts ts file\n"
__prompt -s "-- generating shortcuts ts file"
local __tsfile=$_SCRIPT_DIR/generated/shortcuts.ts
local __xmlfile=$_SCRIPT_DIR/../../resources/shortcuts.xml

mapfile -t __shortcuts_desc <<<"$(awk -F'"' '/desc/ { for(i=1;i<NF;i++) if($i~/description=/) { print $(i+1) } }' "$__xmlfile")"
mapfile -t __shortcuts_desc <<<"$(grep -oE 'description="[^"]+"' "${__xmlfile}" | cut -d'"' -f2)"

printf "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE TS>\n<TS version=\"2.1\">\n" >"$__tsfile"
printf "<context>\n\t<name>SettingsDialog</name>" >>"$__tsfile"

for n in "${__shortcuts_desc[@]}"; do
__prompt -i "-- adding '${n}'"
printf "\n\t<message>\n\t\t<location filename=\"../main.cpp\"/>\n\t\t<source>%s</source>\n\t\t<translation type=\"unfinished\"></translation>\n\t</message>" "$n" >>"$__tsfile"
done

Expand All @@ -87,12 +90,12 @@ extract-shortcuts() {
}

extract-source-strings() {
prompt -s "-- generating sources ts file\n"
__prompt -s "-- generating sources ts file"
"$_QT_DIR/bin/lupdate" -recursive -no-obsolete "$_SCRIPT_DIR/../../src" -ts "$_SCRIPT_DIR/generated/sources.ts"
}

update-template() {
prompt -s "-- updating template ts file\n"
__prompt -s "-- updating template ts file"
local templatefile="$_SCRIPT_DIR/template.ts"
declare -a generated
for f in "$_SCRIPT_DIR/generated/"*; do
Expand Down
Loading

0 comments on commit 27e5877

Please sign in to comment.