Commit Graph

7 Commits

Author SHA1 Message Date
Joey Parrish 7e6a0f38ff fix: Correct license headers in misc. files
This corrects/normalizes license headers in misc. files, such as
config files, docs, build tools, tests, and externs.  This does not
affect the compiled output, and is only done for consistency.

Issue #2638

Change-Id: I9d8da2de55243b08d7df2b743aac73c6f15e858a
2020-06-09 16:13:56 -07:00
Joey Parrish 64896d70b0 Use shorter license header
This reflects changes in Google's policy on JavaScript license
headers, which should be smaller to avoid increasing the size of the
binary unnecessarily.

This also updates the company name from "Google, Inc" to "Google LLC".

Change-Id: I3f8b9ed3700b6351f43173d50c94d35c333e82b4
2019-11-22 18:18:36 +00:00
Jacob Trimble 47daf49f31 Use arrow functions for callbacks.
This is an automated change to convert use of "function" functions
to arrow functions.  This doesn't change all uses of bind() that
could be converted.  This also doesn't remove all "function" functions.

Change-Id: I40ac7d086bcef947a1be083359c8fd1d4499a9c3
2019-05-09 16:40:46 +00:00
Joey Parrish 685e9d57cf Eliminate free calls of static methods
It is type-safe to alias a class, but not one of its static methods.
Aliasing the method without the class makes it a "free call" to invoke
the aliased method.

A "free call" is when you call a method without the context of its
instance of class.  There were several cases of this with static
methods.

This will be enforced by a future release of the compiler, which I
believe will lead into compiler support for "this" in static ES6
methods.  In ES6, you can use "this" in static methods to refer to the
class and call other static methods.  Closure compiler doesn't support
static "this" yet, but we will start using it as soon as it is
supported.

Change-Id: I4249db8b6dda9231ebba60ee0d4ad734a692c2fe
2019-05-03 18:43:35 +00:00
Aaron Vaage b84e74e825 Use Language Terminology In Our Code
Now that we have a formal terminology for how we talk about
language and locales, this change updates our code to utilize
our new vocabulary.

For more information on our terminology, see our "Talking About
Languages" document.

While the expression of the behaviour has changed, the final
observable behaviour should not have changed. The goal of the
"rephrasing" was to build our logic based on the concepts discussed
in our "Talking About Languages" document.

Change-Id: I16c405e3d5a4d1e2275c99d5ec0bbdbaaf8373b9
2018-11-15 20:11:20 +00:00
Aaron Vaage b3f6e24fdb Add Tests For Language Normalization
Added some tests for language normalization to ensure
that it is returning data in the way that we expect.

Updated the normalization code to make the base language
lowercase and the region uppercase.

Change-Id: I8f454b61e94b26a55aeb5b3437050155c8976568
2018-10-12 15:56:39 +00:00
Aaron Vaage 9b6733b964 Create getLanguage utility
Created utilities to get the language of variants and text streams.
This should be used whenever we need to get the language of a variant
or text stream.

Change-Id: Id34fe5aefa10dd368f7995314cff9d927654a326
2018-10-11 21:27:54 +00:00