gettext 1.1.0+2
gettext: ^1.1.0+2

Dart native js
Flutter Android iOS web

Platform agnostic dart implementation of gettext, a localization framework.

1
likes
90 / 110
pub points
78 %
popularity

We analyzed this package on Nov 22, 2020, and awarded it 90 pub points (of a possible 110):

Follow Dart file conventions
20 / 20

10/10 points: Provide a valid pubspec.yaml

5/5 points: Provide a valid README.md

5/5 points: Provide a valid CHANGELOG.md

Provide documentation
10 / 20

10/10 points: Package has an example

  • Found example at: example/main.dart

0/10 points: 20% or more of the public API has dartdoc comments

  • 5 out of 40 API elements (12.5 %) have documentation comments.

Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API. Document at least 20% of the public API elements.

Support multiple platforms
20 / 20

20/20 points: Supports 2 of 2 possible platforms (native, js)

Pass static analysis
20 / 30

20/30 points: code has no errors, warnings, lints, or formatting issues

Found 4 issues. Showing the first 2:

INFO: Unnecessary new keyword.

lib/gettext.dart:193:12

    ╷
193 │       return new Translations(
    │ ┌────────────^
194 │ │       contexts.map((key, value) {
195 │ │         final values = new Map<String, Translation>();
196 │ │ 
197 │ │         if (value is Map<String, dynamic>) {
198 │ │           value.forEach((msgid, json) {
199 │ │             if (json is Map && json["msgstr"] is List) {
200 │ │               values[msgid] = new Translation(
201 │ │                 json["msgstr"]
202 │ │                     .map((row) => row.toString())
203 │ │                     .cast<String>()
204 │ │                     .toList(),
205 │ │                 comments: json["comments"],
206 │ │               );
207 │ │             }
208 │ │           });
209 │ │         }
210 │ │ 
211 │ │         return MapEntry<String, Map<String, Translation>>(key, values);
212 │ │       }),
213 │ │     );
    │ └─────^
    ╵

To reproduce make sure you are using pedantic and run dartanalyzer lib/gettext.dart

INFO: Unnecessary new keyword.

lib/gettext.dart:195:24

    ╷
195 │         final values = new Map<String, Translation>();
    │                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ╵

To reproduce make sure you are using pedantic and run dartanalyzer lib/gettext.dart

Support up-to-date dependencies
20 / 20

10/10 points: All of the package dependencies are supported in the latest version

No dependencies.

To reproduce run pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides.

10/10 points: Package supports latest stable Dart and Flutter SDKs

1
likes
90
pub points
78%
popularity

Platform agnostic dart implementation of gettext, a localization framework.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

cah4o3@gmail.com

License

MIT (LICENSE)

More

Packages that depend on gettext