File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 14
14
# See the License for the specific language governing permissions and
15
15
# limitations under the License.
16
16
17
- # This script updates `translations/kubectl/template.pot` for
18
- # `pkg/kubectl/cmd/*.go pkg/kubectl/cmd/*/*.go` .
17
+ # This script updates `staging/src/k8s.io/kubectl/pkg/util/i18n/ translations/kubectl/template.pot` and
18
+ # generates/fixes .po and .mo files .
19
19
# Usage: `update-translations.sh`.
20
20
21
21
KUBE_ROOT=$( dirname " ${BASH_SOURCE[0]} " ) /..
98
98
if [[ " ${fix_translations} " == " true" ]]; then
99
99
echo " Fixing .po files"
100
100
kube::util::ensure-temp-dir
101
- for PO_FILE in translations /kubectl/* /LC_MESSAGES/k8s.po; do
101
+ for PO_FILE in " ${TRANSLATIONS} " /kubectl/* /LC_MESSAGES/k8s.po; do
102
102
TMP=" ${KUBE_TEMP} /fix.po"
103
103
if [[ " ${PO_FILE} " =~ .* /default/.* || " ${PO_FILE} " =~ .* /en_US/.* ]]; then
104
104
# mark obsolete, and set default values for english translations
105
- msgen translations /kubectl/template.pot | \
105
+ msgen " ${TRANSLATIONS} /kubectl/template.pot" | \
106
106
msgmerge -s --no-fuzzy-matching " ${PO_FILE} " - > " ${TMP} "
107
107
else
108
108
# mark obsolete, but do not add untranslated messages
109
- msgmerge -s --no-fuzzy-matching " ${PO_FILE} " translations /kubectl/template.pot | msgattrib --translated - > " ${TMP} "
109
+ msgmerge -s --no-fuzzy-matching " ${PO_FILE} " " ${TRANSLATIONS} /kubectl/template.pot" | msgattrib --translated - > " ${TMP} "
110
110
fi
111
111
mv " ${TMP} " " ${PO_FILE} "
112
112
done
You can’t perform that action at this time.
0 commit comments