Skip to content

Commit 1e0f695

Browse files
committed
fix translations location in update-translations.sh
1 parent 006d5b8 commit 1e0f695

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: hack/update-translations.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

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.
1919
# Usage: `update-translations.sh`.
2020

2121
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
@@ -98,15 +98,15 @@ fi
9898
if [[ "${fix_translations}" == "true" ]]; then
9999
echo "Fixing .po files"
100100
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
102102
TMP="${KUBE_TEMP}/fix.po"
103103
if [[ "${PO_FILE}" =~ .*/default/.* || "${PO_FILE}" =~ .*/en_US/.* ]]; then
104104
# mark obsolete, and set default values for english translations
105-
msgen translations/kubectl/template.pot | \
105+
msgen "${TRANSLATIONS}/kubectl/template.pot" | \
106106
msgmerge -s --no-fuzzy-matching "${PO_FILE}" - > "${TMP}"
107107
else
108108
# 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}"
110110
fi
111111
mv "${TMP}" "${PO_FILE}"
112112
done

0 commit comments

Comments
 (0)