warren-bank / node-translate-webextension-strings

Command-line utility to use the IBM Watson Language Translator service to translate strings in WebExtensions that use the 'chrome.i18n' infrastructure to implement internationalization.
GNU General Public License v2.0
0 stars 1 forks source link

path for put IBM_TRANSLATOR_API_CREDENTIALS.sh? #2

Closed johnfelipe closed 2 years ago

johnfelipe commented 2 years ago

i edit test.sh

# declare variables "IBM_TRANSLATOR_API_KEY" and "IBM_TRANSLATOR_API_URL"
source "${HOME}/node-translate-webextension-strings/IBM_TRANSLATOR_API_CREDENTIALS.sh"

#DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DIR="/root/node-translate-webextension-strings"

function translate-webextension-strings {
  node "${DIR}/bin/translate-webextension-strings.js" "$@"
}

input_file="${DIR}/tests/03-xrengine/1-input/_locales/en/admin.json"

and

cd /root/node-translate-webextension-strings/

nano IBM_TRANSLATOR_API_CREDENTIALS.sh

##
export IBM_TRANSLATOR_API_KEY='xxxxx-xxxxx-gJel1'
export IBM_TRANSLATOR_API_URL='https://api.us-south.language-translator.watson.cloud.ibm.com/instances/xxxx-a71a-4576-8c3b-xxxxx'
##

but test.log

  ERROR: IBM Cloud account API key is required