2016-02-11 02:11:03 +00:00
|
|
|
// Copyright 2015 The Chromium Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2017-08-24 00:07:59 +00:00
|
|
|
import 'dart:async';
|
|
|
|
|
2016-02-11 02:11:03 +00:00
|
|
|
import 'package:intl/intl.dart';
|
|
|
|
import 'package:flutter/widgets.dart';
|
2015-12-03 23:03:19 +00:00
|
|
|
|
2017-08-24 00:07:59 +00:00
|
|
|
import 'i18n/stock_messages_all.dart';
|
2015-12-03 23:03:19 +00:00
|
|
|
|
2017-08-24 00:07:59 +00:00
|
|
|
// Information about how this file relates to i18n/stock_messages_all.dart and how the i18n files
|
|
|
|
// were generated can be found in i18n/regenerate.md.
|
|
|
|
|
|
|
|
class StockStrings {
|
|
|
|
StockStrings(Locale locale) : _localeName = locale.toString();
|
|
|
|
|
|
|
|
final String _localeName;
|
|
|
|
|
|
|
|
static Future<StockStrings> load(Locale locale) {
|
|
|
|
return initializeMessages(locale.toString())
|
2018-10-01 19:29:08 +00:00
|
|
|
.then<StockStrings>((Object _) {
|
2018-09-12 06:29:29 +00:00
|
|
|
return StockStrings(locale);
|
2017-08-24 00:07:59 +00:00
|
|
|
});
|
2015-12-07 19:19:15 +00:00
|
|
|
}
|
|
|
|
|
2017-08-24 00:07:59 +00:00
|
|
|
static StockStrings of(BuildContext context) {
|
|
|
|
return Localizations.of<StockStrings>(context, StockStrings);
|
|
|
|
}
|
2015-12-07 19:19:15 +00:00
|
|
|
|
2017-08-24 00:07:59 +00:00
|
|
|
String title() {
|
|
|
|
return Intl.message(
|
|
|
|
'<Stocks>',
|
|
|
|
name: 'title',
|
|
|
|
desc: 'Title for the Stocks application',
|
|
|
|
locale: _localeName,
|
|
|
|
);
|
|
|
|
}
|
2015-12-03 23:03:19 +00:00
|
|
|
|
2015-12-07 19:19:15 +00:00
|
|
|
String market() => Intl.message(
|
2015-12-03 23:03:19 +00:00
|
|
|
'MARKET',
|
|
|
|
name: 'market',
|
2017-08-24 00:07:59 +00:00
|
|
|
desc: 'Label for the Market tab',
|
|
|
|
locale: _localeName,
|
2015-12-03 23:03:19 +00:00
|
|
|
);
|
|
|
|
|
2015-12-07 19:19:15 +00:00
|
|
|
String portfolio() => Intl.message(
|
2015-12-03 23:03:19 +00:00
|
|
|
'PORTFOLIO',
|
|
|
|
name: 'portfolio',
|
2017-08-24 00:07:59 +00:00
|
|
|
desc: 'Label for the Portfolio tab',
|
|
|
|
locale: _localeName,
|
2015-12-03 23:03:19 +00:00
|
|
|
);
|
|
|
|
}
|