Common Issues - Localize/localize-cli GitHub Wiki
Table of Contents
- Installation
- Usage
- No configuration file found! Run the following command to create one:
- Error: [Errno 2] No such file or directory: '/full/path/to/your/language_code.extension'
- AttributeError: 'NoneType' object has no attribute 'rfind'
- Unauthorized for file or Resource not found for file
- I did localize pull and the file doesn't have my translations.
Installation
RequirementParseError: Invalid requirement, parse error at "'=2.10.0'"
- Install all dependencies manually:
pip install 'requests==2.10.0'
pip install 'colorama==0.3.1'
pip install 'pyyaml==3.11'
- Install
localizewithout dependencies:
pip install localize --no-dependencies
Usage
No configuration file found! Run the following command to create one:
- Create your configuration file:
localize init
Error: [Errno 2] No such file or directory: '/full/path/to/your/language_code.extension'
- Open your config file with your editor of choice located here:
/Users/USER_NAME/.localize/config.yml
- Update the path:
pull:
targets:
- file: /full/path/to/your/language_code.extension
push:
sources:
- file: /full/path/to/your/language_code.extension
Note: The path for push is your source file, and pull is your new translated file. You do not need to create the pull file.
- Save the file and retry the command that caused the error.
AttributeError: 'NoneType' object has no attribute 'rfind'
- Most likely malformated file path, or empty file path in config file. Follow Error: [Errno 2] No such file or directory: '/full/path/to/your/language_code.extension' directions.
Unauthorized for file or Resource not found for file
- Open your config file with your editor of choice located here:
/Users/USER_NAME/.localize/config.yml
- Make sure that the
projectfield has the correct projectId and thetokenfield has the correct public key.
api:
project: YOUR_PROJECT_KEY
token: YOUR_API_PUBLIC_KEY
I did localize pull and the file doesn't have my translations.
- Open your config file with your editor of choice located here:
/Users/USER_NAME/.localize/config.yml
- Make sure that your
pullsection looks like this:
pull:
targets:
- file: /PATH_TO_FILE/LANGAUGE_CODE.EXTENSION
- Your file name should only be a valid language code that is active on your project.
es.EXTENSION- CorrectSURCE_FILE_NAME.es.EXTENSION- Wrongspanish.EXTENSION- Wrong
- The extension needs to match the source file extension.