szotp / localization_sheets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A tool to import translations into native iOS or Flutter app.

Usage

  1. Run command pub global activate -sgit https://github.com/szotp/localization_sheets.
  2. Ensure that pub cache and dart path was added to PATH:
# only works if you installed flutter in your $HOME
export PATH=$PATH:$HOME/flutter/.pub-cache/bin
export PATH=$PATH:$HOME/flutter/bin/cache/dart-sdk/bin 
  1. Open the project.
  2. Create localization.json if it doesn't exist. This file contains options that dictate where and how strings will be generated. TODO: describe possible settings.
  3. Run localization_sheets.
  4. If running for the first time: tool will ask you to open URL and grant some permissions.
  5. Commit the changes if needed.

Troubleshooting

In case o problems, delete the cache directory: rm -f ~/.localization_sheets

custom.dart

import 'dart:io';

import 'localization_sheets.dart' as other;

void main(List<String> arguments) {
  Directory.current = '<CURRENT>';
  other.main(arguments);
}

About


Languages

Language:Dart 97.8%Language:Swift 1.2%Language:Shell 0.5%Language:Kotlin 0.4%Language:Objective-C 0.1%