This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// This is inspired by intl_translation extract command https://github.com/dart-lang/intl_translation/blob/8a5e883d7fe07b0244adbaf3489ceb3b08385483/bin/extract_to_arb.dart | |
/// and is a slimed down rough version of it. Most of the code is from this package which is an excellent learning resource for anyone who wants | |
/// to play around with the dart analyzer. | |
/// This is a rough script, to extract localization keys for the easy_localization library. It will analyze the souce | |
/// code and find occurrences of tr and plural ( you could add other method names e.g. gender etc ) and extract the argument at index $argumentIndex | |
/// which should be the translation key. It then merges those keys to your current translated keys and spits the merged version where the | |
/// untranslated keys have a value of "MISSING". | |
/// Known issues | |
/// tr( isSomething ? "true_key" : "false_key", context ) -> will get this as key isSomething ? "true_key" : "false_key" | |
import 'dart:async'; |