Skip to content

Common Issues

Jamie Binns edited this page Apr 22, 2020 · 5 revisions

Table of Contents

Installation

RequirementParseError: Invalid requirement, parse error at "'=2.10.0'"

  1. Install all dependencies manually:
pip install 'requests==2.10.0'
pip install 'colorama==0.3.1'
pip install 'pyyaml==3.11'
  1. Install localize without dependencies:
pip install localize --no-dependencies

Usage

No configuration file found! Run the following command to create one:

  1. Create your configuration file:
localize init

Error: [Errno 2] No such file or directory: '/full/path/to/your/language_code.extension'

  1. Open your config file with your editor of choice located here:
/Users/USER_NAME/.localize/config.yml
  1. 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.

  1. Save the file and retry the command that caused the error.

AttributeError: 'NoneType' object has no attribute 'rfind'

  1. 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

  1. Open your config file with your editor of choice located here:
/Users/USER_NAME/.localize/config.yml
  1. Make sure that the project field has the correct projectId and the token field 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.

  1. Open your config file with your editor of choice located here:
/Users/USER_NAME/.localize/config.yml
  1. Make sure that your pull section 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 - Correct
    • SURCE_FILE_NAME.es.EXTENSION - Wrong
    • spanish.EXTENSION - Wrong
  • The extension needs to match the source file extension.