Make .mo file #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow | |
name: Make .mo file | |
on: | |
workflow_dispatch: | |
jobs: | |
upload_and_commit: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Git | |
run: | | |
git config --global user.name "PeterSuh-Q3" | |
git config --global user.email dante9000@gmail.com | |
- name: make local mo file | |
run: | | |
ROOT_PATH=${{ github.workspace }} | |
cd ${ROOT_PATH}/ | |
echo "${ROOT_PATH}" | |
echo "Convert po2mo begin" | |
sudo apt-get update | |
sudo apt-get install gettext | |
DEST_PATH="${ROOT_PATH}/buildroot/board/tcrpfriend/rootfs-overlay/root/lang" | |
echo "${DEST_PATH}" | |
for P in $(ls ${DEST_PATH}/*/LC_MESSAGES/msg.po 2>/dev/null); do | |
# Use msgfmt command to compile the .po file into a binary .mo file | |
echo "msgfmt ${P} to ${P/.po/.mo}" | |
msgfmt ${P} -o ${P/.po/.mo} | |
done | |
echo "Convert po2mo end" | |
ls -lrt ${DEST_PATH}/*/LC_MESSAGES/ | |
- name: Commit and push changes | |
run: | | |
git add . | |
git commit -a -m "upload lastest" | |
git push |