flutter_lokalise 0.1.1

  • Readme
  • Changelog
  • Installing
  • 55

flutter_lokalise #

pub package Build Status codecov

A tool to download translation bundles from Lokalise and convert them
to .arb files.

Currently, it supports following commands:

download command

Usage #

Add configuration to pubspec.yaml:

  flutter_lokalise: any

    - tag1
    - tag2

Run flutter_lokalise:

flutter pub run flutter_lokalise \
  [--working-directory <path>] \
  [--api-token <token>] \
  [--project-id <project_id>] \

You can also follow how to set up a global command to make it
available as a regular shell command by appending PATH.

flutter_lokalise <command>>

or creating an alias instead:

alias flutter_lokalise="flutter pub run flutter_lokalise"

flutter_lokalise <command>>

download command #

Downloads .arb translation files.

flutter_lokalise download \
  [--output <path>] \
  [--include-tags <tag1,tag2,...>]

For example:

flutter_lokalise download

0.1.1 #

  • Handle newline characters in JSON

0.1.0 #

  • Download translation files from Lokalise to ARB format

Use this package as an executable

1. Install it

You can install the package from the command line:

$ pub global activate flutter_lokalise

2. Use it

The package has the following executables:

$ flutter_lokalise

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  flutter_lokalise: ^0.1.1

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:flutter_lokalise/flutter_lokalise.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jul 11, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.14

Health issues and suggestions

Document public APIs. (-1 points)

1 out of 1 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/src/arb_converter/json_to_arb_converter.dart.

Run dartfmt to format lib/src/arb_converter/json_to_arb_converter.dart.

Format lib/src/client/downloader.dart.

Run dartfmt to format lib/src/client/downloader.dart.

Format lib/src/client/files_download_request_body.dart.

Run dartfmt to format lib/src/client/files_download_request_body.dart.

Fix additional 8 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/client/files_download_response_body.dart (Run dartfmt to format lib/src/client/files_download_response_body.dart.)
  • lib/src/client/lokalise_client.dart (Run dartfmt to format lib/src/client/lokalise_client.dart.)
  • lib/src/client/lokalise_response.dart (Run dartfmt to format lib/src/client/lokalise_response.dart.)
  • lib/src/command/arg_results_extension.dart (Run dartfmt to format lib/src/command/arg_results_extension.dart.)
  • lib/src/command/download_command.dart (Run dartfmt to format lib/src/command/download_command.dart.)
  • lib/src/command/flutter_lokalise_command.dart (Run dartfmt to format lib/src/command/flutter_lokalise_command.dart.)
  • lib/src/command/flutter_lokalise_dart_command_runner.dart (Run dartfmt to format lib/src/command/flutter_lokalise_dart_command_runner.dart.)
  • lib/src/lokalise_config/lokalise_config.dart (Run dartfmt to format lib/src/lokalise_config/lokalise_config.dart.)

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (freezed_annotation).

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and flutter_lokalise.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.6.0 <3.0.0
archive ^2.0.11 2.0.13
args ^1.5.2 1.6.0
freezed_annotation ^0.7.1 0.7.1 0.11.0
http ^0.12.1 0.12.1
json_annotation ^3.0.1 3.0.1
logging ^0.11.4 0.11.4
meta ^1.1.8 1.2.2 1.3.0-nullsafety
path ^1.6.4 1.7.0
quiver ^2.0.5 2.1.3
string_unescape ^1.5.1 1.5.1
yaml ^2.2.1 2.2.1
Transitive dependencies
charcode 1.1.3
collection 1.14.13 1.15.0-nullsafety
convert 2.1.1
crypto 2.1.5
http_parser 3.1.4
source_span 1.7.0
stack_trace 1.9.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.2.0 1.3.0-nullsafety
Dev dependencies
build_runner ^1.10.0
freezed ^0.10.8
json_serializable ^3.3.0
matcher ^0.12.6 0.12.8
mock_web_server ^4.1.1
mockito ^4.1.1
pedantic ^1.9.0 1.9.2
remove_from_coverage ^1.0.7
test ^1.14.3
test_coverage ^0.4.1