Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent naming conventions in package intl #20384

Closed
DartBot opened this issue Aug 6, 2014 · 4 comments
Closed

Inconsistent naming conventions in package intl #20384

DartBot opened this issue Aug 6, 2014 · 4 comments
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Aug 6, 2014

This issue was originally filed by @jolleekin


There are some inconsistent naming conventions in package intl:

  1. parseUTC in date_format.dart (should be parseUtc)
  2. HTTPRequestDataReader in src/http_request_data_reader.dart (should be HttpRequestDataReader)
  3. ICUParser in src/icu_parser.dart (should be IcuParser)

Just a question: why did the Dart team decide to use UPPERCASE for all property names in NumberSymbols and DateSymbols?

class NumberSymbols {
  final String NAME;
  final String DECIMAL_SEP, GROUP_SEP, PERCENT, ZERO_DIGIT, PLUS_SIGN,
      MINUS_SIGN, EXP_SYMBOL, PERMILL, INFINITY, NAN, DECIMAL_PATTERN,
      SCIENTIFIC_PATTERN, PERCENT_PATTERN, CURRENCY_PATTERN, DEF_CURRENCY_CODE;

class DateSymbols {
  String NAME;
  List<String> ERAS, ERANAMES, NARROWMONTHS, STANDALONENARROWMONTHS,
      MONTHS, STANDALONEMONTHS, SHORTMONTHS, STANDALONESHORTMONTHS, WEEKDAYS,
      STANDALONEWEEKDAYS, SHORTWEEKDAYS, STANDALONESHORTWEEKDAYS,
      NARROWWEEKDAYS, STANDALONENARROWWEEKDAYS, SHORTQUARTERS,
      QUARTERS, AMPMS, DATEFORMATS, TIMEFORMATS, DATETIMEFORMATS;
  Map<String, String> AVAILABLEFORMATS;
  int FIRSTDAYOFWEEK;
  List<int> WEEKENDRANGE;
  int FIRSTWEEKCUTOFFDAY;
  ...
}

What version of the product are you using? On what operating system?
intl 0.11.4

@kasperl
Copy link

kasperl commented Aug 6, 2014

Added Area-Pkg, Pkg-Intl, Triaged labels.

@alan-knight
Copy link
Contributor

For parseUTC we would probably need to introduce a new method and retain the old one in order to avoid a breaking change. I think the others are purely internal.

The all uppercase for those properties is for consistency with ICU.


Removed Priority-Unassigned label.
Added Priority-Medium, Accepted labels.

@alan-knight
Copy link
Contributor

Fixed in r40401 in repo. Will be published to pub in 0.11.10 when that comes out, but didn't seem worth a new version on its own.


Added Fixed label.

@DartBot DartBot added Type-Enhancement area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. labels Oct 29, 2014
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This issue has been moved to dart-lang/i18n#319.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants