Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #
- # Copyright (C) 2017 Nethesis S.r.l.
- #
- # This script is part of NethServer.
- #
- # NethServer is free software: you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- # the Free Software Foundation, either version 3 of the License,
- # or any later version.
- #
- # NethServer is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU General Public License for more details.
- #
- # You should have received a copy of the GNU General Public License
- # along with NethServer. If not, see COPYING.
- #
- if ! which tx >/dev/null; then
- echo "Transifex client not found. Install Transifex client." 2>&1
- exit 1
- fi
- prefix=$(basename $(pwd))
- cfg=.tx/config
- propfiles=($(find -type f -name '*EN.properties'))
- if ! [ -f "${cfg}" ]; then
- tx init
- fi
- for src in ${propfiles[@]}; do
- parentdir=$(dirname $src)
- module=$(basename $parentdir)
- grep -F "${src}" ${cfg} && continue
- resource=$(basename -s .php ${src} | sed -e 's/_en_EN\.properties//g' -e 's/\./_/g')
- echo "[webtop5.${prefix}-${module}_${resource}]
- source_file = ${src}
- source_lang = en
- type = PROPERTIES
- " >> ${cfg}
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement