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

Add translations system #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions META-INF/com/google/android/update-binary
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ $POSTFSDATA && cp -af $INSTALLER/common/post-fs-data.sh $MODPATH/post-fs-data.sh
# service mode scripts
$LATESTARTSERVICE && cp -af $INSTALLER/common/service.sh $MODPATH/service.sh

#ui file download and install
ui_select

ui_print "- Setting permissions"
set_permissions

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![Cover](https://ador.chorompotro.com/energized_magisk_cover.svg)
![Cover](https://nayemador.com/assets/covers/energized_magisk_cover.svg)

<h1 align="center">Energized - Magisk ⚡</h1>

Expand Down
17 changes: 17 additions & 0 deletions config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,20 @@ set_permissions() {
# set_perm $MODPATH/system/lib/libart.so 0 0 0644
set_perm $MODPATH/system/bin/energized 0 0 0777
}

ui_select() {
UI_local=`getprop persist.sys.locale`
UI_url=https://raw.githubusercontent.com/xerta555/Energized_languages/
energized_dir=$MODPATH/system/bin


case $UI_local in
fr-FR) wget --no-check-certificate -O $energized_dir/FR__energized $UI_url/fr_FR_energized
rm -f "$energized_dir/energized"
mv "$energized_dir/fr_FR_energized" "$energized_dir/energized"
chmod 0777 "$energized_dir/en_EN_energized"
;;
*) echo "Your language has not yet been translated, English language is apply."
esac
echo "Translation task done"
}