-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #139 from maximilien/feat/add-trans
chore: add english translation to source code
- Loading branch information
Showing
45 changed files
with
2,098 additions
and
291 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,3 +39,6 @@ jobs: | |
run: | | ||
export GOPATH=$(go env GOPATH)/bin | ||
./bin/test | ||
- name: Validate | ||
run: ./bin/validate |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/env bash | ||
|
||
# Copyright © 2015-2023 The Knative Authors | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
set -e | ||
|
||
echo -e "\nUpdate (Re)generated translation files..." | ||
|
||
PROJ_DIR=$(cd $(dirname $(dirname $0)) && pwd) | ||
if [[ -z $(command -v go-bindata) ]]; then | ||
echo -e "\nInstalling go-bindata..." | ||
# install outside of GO PATH | ||
pushd /tmp >/dev/null | ||
go install -a -v github.com/go-bindata/go-bindata/...@latest | ||
popd > /dev/null | ||
fi | ||
|
||
pushd $PROJ_DIR >/dev/null | ||
go-bindata -pkg resources -o resources -o i18n4go/resources/i18n_resources.go -nocompress i18n4go/i18n/resources/*.json | ||
echo -e "\nCompleted." | ||
|
||
popd >/dev/null | ||
|
||
echo -e "\nVerify translation messages" | ||
|
||
if [[ ! -f $PROJ_DIR/out/i18n4go ]]; then | ||
echo -e "\nMissing built bui18n4go binary..." | ||
exit 1 | ||
fi | ||
|
||
pushd i18n4go >/dev/null | ||
$PROJ_DIR/out/i18n4go checkup -q i18n -v | ||
popd | ||
|
||
echo -e "\nComplete." |
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 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
Oops, something went wrong.