grinder_smartling 0.1.0

  • Installing
  • Versions
  • 49


Runtime Release License Coverage Build

Grinder plug-in dedicated to the synchronization of translations with the Smartling service, based on the File API v2.

Getting started

If you haven't used Grinder before, be sure to check out the related documentation, as it explains how to create a grind.dart file and to define project tasks. Once you're familiar with that process, you may install this plug-in.

Installing via Pub

1. Depend on it

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

  grinder_smartling: *

2. Install it

Install this package and its dependencies from a command prompt:

$ pub get

Once the plug-in has been installed, it may be enabled inside your grind.dart file.


The plug-in lets you synchronize translations with the Smartling service. Two functions are dedicated to this feature:

  • download(): Downloads the message translations from the remote server.
  • upload(): Uploads the source messages to the remote server.

These functions require four named parameters:

  • String fileUri : A value that uniquely identifies the remote file.
  • String projectId : The project identifier.
  • String userId : The identifier used to identify the API user.
  • String userSecret : The secret used to authenticate the API user.

Download the message translations from the Smartling service

The download() function takes a file pattern and a list of locales as inputs, indicating the path of the downloaded files and their target language. The {{locale}} placeholder will be replaced by the locale of each file.

import 'dart:async';
import 'package:grinder/grinder.dart';
import 'package:grinder_smartling/grinder_smartling.dart' as smartling;

@Task('Download the message translations from the Smartling service')
Future i18nDownload() =>
  'path/to/i18n/{{locale}}.json', ['es-ES', 'fr-FR', 'ja-JP'],
  fileUri: '/Gulp-Smartling/messages.json',
  projectId: 'FooBar',
  userId: 'john.doe',
  userSecret: 'MyPassword'

The supported options are:

  • bool includeOriginalStrings = false : A value indicating whether to return the original string when no translation is available.
  • String retrievalType = "published" : The desired format for the download.

Upload the message source to the Smartling service

The upload() function takes a file path as input, specifying the message source to be uploaded.

import 'dart:async';
import 'package:grinder/grinder.dart';
import 'package:grinder_smartling/grinder_smartling.dart' as smartling;

@Task('Upload the source messages to the Smartling service')
Future i18nUpload() => smartling.upload(
  fileUri: '/Gulp-Smartling/messages.json',
  projectId: 'FooBar',
  userId: 'john.doe',
  userSecret: 'MyPassword'

The supported options are:

  • bool authorize = false : A value indicating whether content in the file is authorized in all locales.
  • dynamic callbackUrl = null : The URL of the callback called when the file is 100% published for a locale.
  • String fileType = "" : The file type. If empty, will be guessed from the extension of the input file.

See also


Grinder-Smartling is distributed under the Apache License, version 2.0.


This file contains highlights of what changes on each version of the Grinder-Smartling package.

Version 0.1.0

  • Initial release.

Use this package as a library

1. Depend on it

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

  grinder_smartling: "^0.1.0"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:

      import 'package:grinder_smartling/grinder_smartling.dart';
Version Uploaded Documentation Archive
0.1.0 Jun 3, 2017 Go to the documentation of grinder_smartling 0.1.0 Download grinder_smartling 0.1.0 archive


We analyzed this package on Jun 12, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.60.0
  • pana: 0.11.3


Describes how popular the package is relative to other packages. [more]
0 / 100
Code health derived from static analysis. [more]
97 / 100
Reflects how tidy and up-to-date the package is. [more]
98 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: Flutter, other

Primary library: package:grinder_smartling/grinder_smartling.dart with components: io.


  • Package is getting outdated.

    The package was released 53 weeks ago.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 11 hints.

    Run dartfmt to format lib/grinder_smartling.dart.

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

    Similar analysis of the following files failed:

    • lib/src/file_type.dart (hint)
    • lib/src/locale.dart (hint)
    • lib/src/retrieval_type.dart (hint)
    • lib/src/task.dart (hint)
    • lib/src/tasks/download_task.dart (hint)
    • lib/src/tasks/file_task.dart (hint)
    • lib/src/tasks/upload_task.dart (hint)
  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use grinder_smartling.dart.

  • Use analysis_options.yaml.

    Rename old .analysis_options file to analysis_options.yaml.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.23.0
grinder ^0.8.0 0.8.2
http ^0.11.3 0.11.3+16
meta ^1.0.5 1.1.5
path ^1.4.1 1.6.0
Transitive dependencies
async 2.0.7
charcode 1.1.1
cli_util 0.1.3
collection 1.14.10
glob 1.1.5
http_parser 3.1.2
source_span 1.4.0
string_scanner 1.0.2
typed_data 1.1.5
Dev dependencies
coverage ^0.9.2
coveralls ^1.0.0
test ^0.12.20