flutterl10nmanager 1.0.1

  • Readme
  • Changelog
  • Installing
  • 46

Flutter L10N Manager #

Having lots of localisation files to manage can be quite tedious, especially for larger projects. This package aims to make that management easier. The manager will export all of your localisation files into one manageable CSV. This CSV can then be distributed between your translators and once your translations are complete, you can use the manager to rebuild your localisations files straight back into your Flutter project.

Install #

After cloning the package. Navigate to the package directory and create the executable.

dart2aot bin/main.dart bin/main.dart.aot

Then activate the executable file globally

pub global activate --source path path/to/flutterl10nmanager

Commands #

export #

The export command looks at you Flutter projects internationalisation directory and builds a single CSV containing all of your localisations as defined in intl_messages.arb and all of the corisponding language values from your intl_<locale>.arb files.

example usage:

flutterl10nmanager export path/to/flutter/l10n/dir -o optional/output/file.csv

create #

The create command takes a csv which was generated by the export command and creates an internationalisation arb file for each language specifed in the csv.

example usage:

flutterl10nmanager create path/to/export.csv -o optional/output/dir

1.0.0 #

  • Initial version with export and create commands

1.0.1 #

  • Code formatting
  • Install documentation

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate flutterl10nmanager

2. Use it

The package has the following executables:


$ flutterl10nmanager

Use this package as a library

1. Depend on it

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


dependencies:
  flutterl10nmanager: ^1.0.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:flutterl10nmanager/commands/create.dart';
import 'package:flutterl10nmanager/commands/export.dart';
import 'package:flutterl10nmanager/entities/localisation.dart';
import 'package:flutterl10nmanager/helpers.dart';
import 'package:flutterl10nmanager/manager.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
46
Learn more about scoring.

We analyzed this package on Dec 7, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.1
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, other

Platform components identified in package: io.

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 (intl).

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

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

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.4.0 <3.0.0
ansicolor ^1.0.2 1.0.2
args ^1.5.2 1.5.2
csv ^4.0.3 4.0.3
intl ^0.15.8 0.15.8 0.16.0
Transitive dependencies
path 1.6.4
Dev dependencies
pedantic ^1.7.0
test ^1.5.0