Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

French translation for the main script #107

Merged
merged 23 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7466ac4
Add necessary files to start Arch-Update French translation
Antiz96 Feb 9, 2024
d476d0c
First french translation test
Antiz96 Feb 9, 2024
3216c5d
Correct .mo file installation path and script compliance with transla…
Antiz96 Feb 9, 2024
28a3eec
Using ARCH-UPDATE as TEXTDOMAIN to avoid conflicting with the arch-up…
Antiz96 Feb 9, 2024
76ca0b9
Correct .mo install path in Makefile
Antiz96 Feb 9, 2024
a540924
Ensure the .mo file is read whether arch-update has been installed fr…
Antiz96 Feb 9, 2024
082dc94
Install the French version of the README under /usr(/local)/share/doc…
Antiz96 Feb 9, 2024
3f9d15b
Add missing translation for Arch News
Antiz96 Feb 9, 2024
99217b0
Correct typo into the script
Antiz96 Feb 9, 2024
e4bb633
French translation of the main script
Antiz96 Feb 9, 2024
be3ff02
Exclude the po folder from the CI codespell test
Antiz96 Feb 9, 2024
5a78754
Fix typo in the script
Antiz96 Feb 9, 2024
59df58f
Test
Antiz96 Feb 9, 2024
3f04511
Exclude shellcheck SC1091 in the main script
Antiz96 Feb 9, 2024
066ce92
Correct line numbers in french po file
Antiz96 Feb 9, 2024
06af647
Little correction in the french README
Antiz96 Feb 9, 2024
7ea0e95
Apply suggestions from code review
Antiz96 Feb 9, 2024
a75b80b
Add translation for the URL tag in Arch News listing
Antiz96 Feb 9, 2024
8e288e1
Add translation for the URL tag in Arch News listing
Antiz96 Feb 9, 2024
24adb05
Fix answer to questions in french translation
Antiz96 Feb 9, 2024
7ce6b6d
Fix answer to questions in main script
Antiz96 Feb 9, 2024
214e368
Remove useless extra quotes from the main script
Antiz96 Feb 9, 2024
984d513
Remove extra space in the french translation
Antiz96 Feb 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
run: actionlint -ignore 'label "CI-CD" is unknown' .github/workflows/CI.yml

- name: Run codespell
run: codespell --skip="README-fr.md,./doc/man/fr" --enable-colors
run: codespell --skip="README-fr.md,./doc/man/fr,./po" --enable-colors

- name: Run mdl
run: mdl --style .github/workflows/mdl_style.rb .
Expand Down
46 changes: 35 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pkgname=arch-update
_pkgname=Arch-Update

PREFIX ?= /usr/local

Expand All @@ -7,19 +8,30 @@ PREFIX ?= /usr/local
all:

install:
# Install the main script
install -Dm 755 "src/script/${pkgname}.sh" "${DESTDIR}${PREFIX}/bin/${pkgname}"

install -Dm 666 "src/icons/${pkgname}.svg" "${DESTDIR}/usr/share/icons/${pkgname}/${pkgname}.svg"
install -Dm 666 "src/icons/${pkgname}_checking.svg" "${DESTDIR}/usr/share/icons/${pkgname}/${pkgname}_checking.svg"
install -Dm 666 "src/icons/${pkgname}_installing.svg" "${DESTDIR}/usr/share/icons/${pkgname}/${pkgname}_installing.svg"
install -Dm 666 "src/icons/${pkgname}_up-to-date.svg" "${DESTDIR}/usr/share/icons/${pkgname}/${pkgname}_up-to-date.svg"
install -Dm 666 "src/icons/${pkgname}_updates-available.svg" "${DESTDIR}/usr/share/icons/${pkgname}/${pkgname}_updates-available.svg"


# Install icons
install -Dm 666 "src/icons/${pkgname}.svg" "${DESTDIR}${PREFIX}/share/icons/${pkgname}/${pkgname}.svg"
install -Dm 666 "src/icons/${pkgname}_checking.svg" "${DESTDIR}${PREFIX}/share/icons/${pkgname}/${pkgname}_checking.svg"
install -Dm 666 "src/icons/${pkgname}_installing.svg" "${DESTDIR}${PREFIX}/share/icons/${pkgname}/${pkgname}_installing.svg"
install -Dm 666 "src/icons/${pkgname}_up-to-date.svg" "${DESTDIR}${PREFIX}/share/icons/${pkgname}/${pkgname}_up-to-date.svg"
install -Dm 666 "src/icons/${pkgname}_updates-available.svg" "${DESTDIR}${PREFIX}/share/icons/${pkgname}/${pkgname}_updates-available.svg"

# Install the .desktop file
install -Dm 644 "res/desktop/${pkgname}.desktop" "${DESTDIR}${PREFIX}/share/applications/${pkgname}.desktop"


# Install systemd units
install -Dm 644 "res/systemd/${pkgname}.service" "${DESTDIR}${PREFIX}/lib/systemd/user/${pkgname}.service"
install -Dm 644 "res/systemd/${pkgname}.timer" "${DESTDIR}${PREFIX}/lib/systemd/user/${pkgname}.timer"

# Generate and install .mo files for translations
# .mo files are installed as "Arch-Update.mo" to avoid conflicting with the "arch-update.mo" files shipped by the arch-update Gnome extension (https://extensions.gnome.org/extension/1010/archlinux-updates-indicator/)
msgfmt po/fr.po -o po/fr.mo
install -Dm 644 po/fr.mo "${DESTDIR}${PREFIX}/share/locale/fr/LC_MESSAGES/${_pkgname}.mo"
rm -f po/fr.mo

# Archive and install man pages
gzip -c "doc/man/${pkgname}.1" > "doc/man/${pkgname}.1.gz"
gzip -c "doc/man/${pkgname}.conf.5" > "doc/man/${pkgname}.conf.5.gz"
gzip -c "doc/man/fr/${pkgname}.1" > "doc/man/fr/${pkgname}.1.gz"
Expand All @@ -32,25 +44,37 @@ install:
rm -f "doc/man/${pkgname}.conf.5.gz"
rm -f "doc/man/fr/${pkgname}.1.gz"
rm -f "doc/man/fr/${pkgname}.conf.5.gz"


# Install documentation
install -Dm 644 README.md "${DESTDIR}${PREFIX}/share/doc/${pkgname}/README.md"
install -Dm 644 README-fr.md "${DESTDIR}${PREFIX}/share/doc/${pkgname}/fr/README-fr.md"

uninstall:
# Delete the main script
rm -f "${DESTDIR}${PREFIX}/bin/${pkgname}"

rm -rf "${DESTDIR}/usr/share/icons/${pkgname}/"
# Delete icons
rm -rf "${DESTDIR}${PREFIX}/share/icons/${pkgname}/"

# Delete the .desktop file
rm -f "${DESTDIR}${PREFIX}/share/applications/${pkgname}.desktop"

# Delete systemd units
rm -f "${DESTDIR}${PREFIX}/lib/systemd/user/${pkgname}.service"
rm -f "${DESTDIR}${PREFIX}/lib/systemd/user/${pkgname}.timer"

# Delete .mo files
rm -f "${DESTDIR}${PREFIX}/usr/share/locale/fr/LC_MESSAGES/${_pkgname}.mo"

# Delete man pages
rm -f "${DESTDIR}${PREFIX}/share/man/man1/${pkgname}.1.gz"
rm -f "${DESTDIR}${PREFIX}/share/man/man5/${pkgname}.conf.5.gz"
rm -f "${DESTDIR}${PREFIX}/share/man/fr/man1/${pkgname}.1.gz"
rm -f "${DESTDIR}${PREFIX}/share/man/fr/man5/${pkgname}.conf.5.gz"


# Delete documentation
rm -rf "${DESTDIR}${PREFIX}/share/doc/${pkgname}/"

test:
# Run the help function of the main script as a simple test
"src/script/${pkgname}.sh" --help
6 changes: 4 additions & 2 deletions README-fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ Pour le démarrer automatiquement **au démarrage du système puis une fois tout
systemctl --user enable --now arch-update.timer
```

### Capture d'écran
### Captures d'écran

*Les captures d'écran montrent le retour du script en anglais, mais `Arch-Update` possède désormais une **traduction française** !*

Personnellement, j'ai intégré l'icône .desktop dans ma barre supérieure.
C'est la première icône en partant de la gauche.
Expand All @@ -108,7 +110,7 @@ Lorsque l'on clique sur l'icône, cela lance la série de fonctions adéquates p
![listing-packages](https://github.com/Antiz96/arch-update/assets/53110319/43a990c8-ed93-420f-8c46-d50d60bff03f)

Une fois que vous avez donné la confirmation pour procéder, `arch-update` propose d'afficher les dernières Arch news.
Les Arch news publiées au cours des 15 derniers jours sont étiquetées comme « [NEW] ».
Les Arch news publiées au cours des 15 derniers jours sont étiquetées comme « [NOUVEAU] ».
Sélectionnez la news à lire en tapant le numéro associé.
Après avoir lu une news, `arch-update` vous proposera à nouveau d'afficher les dernières Arch news, afin que vous puissiez lire plusieurs news à la fois.
Appuyez simplement sur « Entrée » sans saisir de chiffre pour procéder à la mise à jour :
Expand Down
Loading