Compare commits

..

106 Commits

Author SHA1 Message Date
Igor Minar 17d1aef66a chore(release): cutting the angular 0.10.1 inexorable-juggernaut release 2011-09-09 01:01:46 -07:00
Igor Minar 1856f62cb1 docs(changelog): release notes for angular 0.10.1 inexorable-juggernaut 2011-09-09 01:01:05 -07:00
Kai Groner 7e1f364177 fix($location): Use encodeUriQuery instead of escape
Closes #492
2011-09-08 23:00:59 +02:00
Vojta Jina aac68bf2ba fix(scenario): temporary fix for FF6
https://bugzilla.mozilla.org/show_bug.cgi?id=684208
2011-09-08 23:00:59 +02:00
Vojta Jina 4b4292edb8 style: fix some missing semi-colons and spaces, typos 2011-09-08 23:00:59 +02:00
Vojta Jina 292d5d1421 refactor($route): remove some odd code and rename allowReload to forceReload 2011-09-08 23:00:59 +02:00
Vojta Jina 66dec77555 fix(scenario): do not navigate if click event was cancelled
This is jQuery incompatible hack.
But we were doing monkey patching there anyway...

`$(...).trigger('click')` returns an array of return values, so that scenario
runner knows, whether the event default action was cancelled.

Without this fix, scenario runner was doing navigation even if JS code called
`event.preventDefault()`.

Note, this does not work in FF6
2011-09-08 23:00:59 +02:00
Vojta Jina 8fa79066e2 doc($location): $location docs + using $location guide 2011-09-08 23:00:59 +02:00
Vojta Jina 909415d5ed feat(scenario): browserTrigger returns false if preventDefault()
https://developer.mozilla.org/en/DOM/element.dispatchEvent
dispatchEvent method returns false if at least one of the event handlers called
preventDefault(), true otherwise.

It's helpful when browserTrigger method returns this value, as we can assert,
whether the default operation was cancelled or not.
2011-09-08 23:00:59 +02:00
Vojta Jina 4421f3d435 fix(docs): update docs to reflect new $location and fix e2e tests 2011-09-08 23:00:59 +02:00
Vojta Jina 22cb600280 fix($route): update $route to reflect $location changes
* update $route to reflect new $location
* add some more unit tests to $route
* fix some other failing unit tests
* redirect overrides the url now

Breaks $route custom redirect fn has only 3 params now
2011-09-08 23:00:59 +02:00
Vojta Jina 5ba227c7cd feat($location): $location service with html5 history api support
See documentation of $location for more info

Breaks $location has no properties, only get/set methods

Closes #168
Closes #146
Closes #281
Closes #234
2011-09-08 23:00:49 +02:00
Vojta Jina f37f0ea16e feat(jqLite): add event.isDefaultPrevented() as jQuery
Chrome's Event has defaultPrevented property, but other browsers haven't.
This is workaround for other browsers - same as jQuery.
2011-09-08 20:37:28 +02:00
Vojta Jina 91ccb4ba6e feat($browser): add $browser.baseHref()
This method abstracts <base href="" /> in document.head - returns the value.
If absolute href set, it converts the href to relative.
2011-09-08 20:37:28 +02:00
Vojta Jina d0f459c56f feat($sniffer): basic implementation of browser feature testing
This only extracts our 'hashchange' event and html5 history api detection from
$browser.

Closes #400
2011-09-08 20:37:28 +02:00
Vojta Jina cbedf55641 refactor($browser): extract MockWindow, use toHaveBeenCalledOnce 2011-09-08 20:36:33 +02:00
Vojta Jina 988ed451b5 feat($browser): jQuery style url method, onUrlChange event
This is just basic implementation of $browser.url, $browser.onUrlChange methods:

$browser.url() - returns current location.href

$browser.url('/new') - set url to /new
If supported, history.pushState is used, location.href property otherwise.

$browser.url('/new', true) - replace current url with /new
If supported, history.replaceState is used, location.replace otherwise.

$browser.onUrlChange is only fired when url is changed from the browser:
- user types into address bar
- user clicks on back/forward button
- user clicks on link

It's not fired when url is changed using $browser.url()

Breaks Removed $browser.setUrl(), $browser.getUrl(), use $browser.url()
Breaks Removed $browser.onHashChange(), use $browser.onUrlChange()
2011-09-08 20:36:33 +02:00
Vojta Jina fc2f188d4d style(filter): Couple of missing spaces, semi-colons, add empty lines 2011-09-08 17:59:52 +02:00
Vojta Jina 4b1913c5ec fix(filter.currency): Return empty string for non-numbers 2011-09-08 17:59:45 +02:00
Igor Minar 06534413d3 fix(ng:options): ng:change should be called after the new val is set
Closes #547
2011-09-07 23:37:37 -07:00
Igor Minar e54909f5ef fix(docs): use window.execScript instead of window.eval on IE
IE's window.eval doesn't execute in the global context, so we have to
use window.execScript instead which works like window.eval on normal
browsers. However execScript throws an exception when an empty string is
passed in, so I created a workaround with a workaround.
2011-09-06 14:57:37 -07:00
Vojta Jina 79f2512ba7 chore(config): Remove updateView from jstd config
This should have been part of 42062dab34
2011-09-06 17:36:53 +02:00
Vojta Jina b0eb831bce fix($browser.xhr): not convert 0 status to 200 2011-09-05 23:53:53 +02:00
Igor Minar 7f0b97e02c test(jsonp): fixing jsonp e2e tests
- buzz api keeps on throttling our requests which makes our build fail
  so I'm disabling the buzz demo e2e test
- the $xhr service jsonp test was modified to use jsonp on angularjs.org
  instead of buzz api for the same reason as mentioned above
2011-09-02 16:17:05 -07:00
Igor Minar fc7f1ef6a0 chore(version.yaml): preparing the 0.10.1 inexorable-juggernaut iteration 2011-09-02 15:41:41 -07:00
Igor Minar 8bae2a5ecb cutting the 0.10.0 chicken-hands release 2011-09-02 11:32:29 -07:00
Igor Minar 30e5f6274a docs(changelog): release notes for 0.10.0 chicken-hands 2011-09-02 10:53:41 -07:00
Igor Minar bc6e0cc954 docs(guide/tutorial/misc): sync with google docs 2011-09-02 10:44:19 -07:00
Igor Minar 8d11db0757 docs(ng:bind): fix example code 2011-09-01 16:37:08 -07:00
Igor Minar 2a8fe56997 fix(ng:class): make ng:class friendly towards other code adding/removing classes
ng:class as well as ng:class-odd and ng:class-even always reset the
class list to whatever it was before compilation, this makes it
impossible to create another directive which adds its own classes on the
element on which ng:class was applied.

the fix simply removes all classes that were added previously by
ng:class and add classes that the ng:class expression evaluates to.

we can now guarantee that we won't clobber stuff added before or after
compilation as long as all class names are unique.

in order to implement this I had to beef up jqLite#addClass and
jqLite#removeClass to be able to add/remove multiple classes without
creating duplicates.
2011-09-01 16:37:08 -07:00
Igor Minar 622c3ec974 fix(jqLite): addClass should ignore falsy values 2011-09-01 16:37:07 -07:00
Igor Minar db78aa1ce1 test(jqLite): add test for mass assignment to style 2011-09-01 16:37:07 -07:00
Igor Minar 986608fe76 fix(jqLite): special-case attr('class') because of IE9 bug 2011-09-01 16:37:06 -07:00
Igor Minar 31b8624121 feat(scope): add listener deregistration fn for $watch and $on
- both $watch and $on now return a function which when called
  deregisters the listener
- $removeListener was removed and replaced with the above
- added more tests for $watch and $on

Closes #542
2011-09-01 15:00:22 -07:00
Igor Minar a5607e3061 docs(API): various api doc fixes from Toni 2011-09-01 00:19:35 -07:00
Igor Minar ff2cb86d5d style(e2e tests): shorten jquery/jqlite describe 2011-08-31 23:03:58 -07:00
Igor Minar 825cbadf80 kill(merge): removing merge fn - dead buggy code with no specs 2011-08-31 22:32:27 -07:00
Igor Minar 93f96a16f6 fix(scope): fix edge case for $digest & $broadcast scope traversal
- fixed traversal originating on a scope with with a right sibling
- unified code for both $broadcast and $digest
2011-08-31 14:34:56 -07:00
Misko Hevery c763b009ac feat(gdocs.js): output usefull error messages when not logged in. 2011-08-31 14:34:56 -07:00
Misko Hevery e5da0c956b feat(jasmine-node): use the jasmine-node NPM to run our non-browser specs 2011-08-31 14:34:56 -07:00
Misko Hevery 3c80cf3df6 style(docs): improve the formatting of events in docs 2011-08-31 14:34:56 -07:00
Misko Hevery ad3cc16eef feat($route): add events before/after route change
BREAKING CHANGE
* removing `onChange`

FEATURE
* adding three events: $beforeRouteChange, $afterRouteChange, $routeReload
2011-08-31 14:31:23 -07:00
Misko Hevery 08d09ecbaa feat(docs): add support for events 2011-08-31 14:30:21 -07:00
Misko Hevery 456c7f62c5 bug($xhr.bulk): fix exceptions under some circumstances 2011-08-31 14:29:37 -07:00
Misko Hevery c9e7fb894b style(tests): correct indentation 2011-08-30 22:05:13 -07:00
Di Peng 4a9ccc0abc test(i18n): Update some i18n/e2e tests 2011-08-30 02:11:10 -07:00
Di Peng bceadd8e30 feat(i18n): locale specific files changed due to change in ClosureSlurper.js 2011-08-30 02:11:10 -07:00
Di Peng 545b31aa2e feat(closureSlurper): closureSlurper plural rules
- fetch plural rules from closure
- distribtue pluralization rules into each locale specific files
2011-08-30 02:11:09 -07:00
Di Peng e068addadb feat(widget): add ng:pluralize as an Angular widget 2011-08-30 02:11:09 -07:00
Di Peng 0da4902e9d feat(locale): add getPluralCat function 2011-08-30 02:11:08 -07:00
Igor Minar 3ba90003b4 fix(test): improve $cookie service test to work with Safari 5.1
the max size for safari cookies has changed sligtly so I had to adjust
the test to make cookie creation fail on this browser
2011-08-29 14:38:28 -07:00
Di Peng 5927b23ef3 fix(markup): Make special attrs such as ng:href work even without binding
- special attrs such as ng:href, ng:check did not work as intended when
their values do not contain bindings. And this commit is to fix that

Closes #534
2011-08-25 16:34:18 -07:00
Igor Minar 452607fc64 fix(events): fixing IE specific issues
IE doesn't have Array#indexOf and [].splice.call doesn't work there
either.
2011-08-24 18:36:38 -07:00
Di Peng 19401280ae feat(doc): generate both normal and debug version of index.html
- index.html has manifest file and angular.min.js
- index-jq.html has manifest file, angular.min.js and jquery.min.js
- index-debug.html has angular.js
- index-jq-debug.html has angular.js and jquery.min.js
2011-08-24 15:03:09 -07:00
Igor Minar 08a33e7bb3 feat(scope): support for events
- register listeners with $on
- remove listeners with $removeListener
- fire event that bubbles to root with $emit
- fire event that propagates to all child scopes with $broadcast
2011-08-24 15:01:50 -07:00
Igor Minar 30753cb131 feat(ng:cloak): add ng:cloak directive 2011-08-24 15:01:49 -07:00
Di Peng dbf8afcba0 fix(AngularPublic): expose missing angular public methods
- expose lowercase, uppercase and isDate to angular public api
- remove unnecessary extention of jqLite at an early stage
2011-08-24 08:00:33 -07:00
Toni Thompson 446f6b233f doc(API): various API documentation improvements 2011-08-24 11:06:55 +02:00
Igor Minar e3fad0feb3 fix(jqlite): correct the jqLite.removeClass method 2011-08-23 10:27:51 -07:00
Igor Minar 0f6e199d98 chore(ide): add pom.xml for IDEs that grok maven 2011-08-23 08:17:46 -07:00
Di Peng 15e6105779 fix(docs): remove more unecessary use of hide() and show() method
- tutorial section of docs fails to render properly as
doc:tutorial-instructions widget uses deprecated show and hide methods
of jQlite.
2011-08-21 09:40:53 -07:00
Igor Minar ee38918059 doc(changelog): add info about the memory leak in ng:options 2011-08-21 01:31:54 -07:00
Igor Minar 94e3b28d24 preparing the project for 0.10.0 chicken-hands iteration 2011-08-21 00:52:26 -07:00
Igor Minar 38e6d1e313 release notes of the 0.9.19 canine-psychokinesis 2011-08-21 00:50:58 -07:00
Igor Minar 607de75fa4 fix(docs): work around the lame ng:show directive 2011-08-21 00:46:58 -07:00
Igor Minar db04241beb fix(docs): change docs.css to avoid css clashes in buzz example 2011-08-21 00:46:46 -07:00
Di Peng 774db0aecb fix(sample): Fix for jsFiddle integration 2011-08-19 15:27:21 -07:00
Igor Minar dc0b0c77c7 feat($route): add reloadOnSearch route param to avoid reloads
In order to avoid unnecesary route reloads when just hashSearch part
of the url changes, it is now possible to disable this behavior by
setting reloadOnSearch param of the route declaration to false.

Closes #354
2011-08-19 03:55:47 -07:00
Karl Seamon 6114c8f504 fix($resource): properly call error callback when resource is called with two arguments 2011-08-18 15:07:04 -04:00
Vojta Jina b99b0a8072 feat(test): toHaveBeenCalledOnce jasmine matcher 2011-08-18 17:41:23 +02:00
dandoyon 431b748cac doc(sample): Add javascript sandbox integration (jsFiddle)
Change doc_widget.js to:

- render "edit in jsfiddle" button next to all examples
- make opt out certain examples by adding jsfiddle="false" attribute to
  doc:source element
2011-08-16 15:15:06 -07:00
Igor Minar de34ca0b64 fix(filters): fix lint warnings 2011-08-15 12:52:09 -07:00
Igor Minar 793ecb4817 refactor(jqLite): remove jqLite show/hide support
it turns out that even with our tricks, jqLite#show is not usable in
practice and definitely not on par with jQuery. so rather than
introducing half-baked apis which introduce issues, I'm removing them.

I also removed show/hide uses from docs, since they are not needed.

Breaks jqLite.hide/jqLite.show which are no longer available.
2011-08-15 12:51:41 -07:00
Igor Minar 1d45e65f4a chore(jasmine): disable 'Jasmine waiting for..' msg 2011-08-15 00:21:02 -07:00
Igor Minar 2bbef363e4 style(*): remove extra semicolons 2011-08-15 00:21:02 -07:00
Igor Minar 035ad72726 refactor(json): use angularString instead of angular.String 2011-08-15 00:21:02 -07:00
Igor Minar 9d808239b3 style(*): wrap all assignments in if statements
we commonly assign stuff in if statments like this:

if (variable = someFn()) {
  //do something with variable
}

This results in lint and IDE warnings (did you mean ==?).

It is better to be explicit about our intention and wrap the assignement
into parens:

if ((variable = someFn())) {
  //do something with variable
}

Doing so suppresses warnings + is easier to understand the intention.

I verified that the closure compiler strips the extra parens, so there
is no byte overhead for this safety practice.

We should use this style going forward...
2011-08-15 00:20:48 -07:00
Igor Minar ef01362e44 chore(.idea): remove all obsolete idea files 2011-08-15 00:15:07 -07:00
Igor Minar 6c30601ad8 feat(i18n): add i18n/locale rule set files 2011-08-14 23:44:21 -07:00
Igor Minar 37b5c5cfe9 break(date): remove support for 'long', 'longtime' date formats and 'z' flag
The support for the 'z' formatting flag was removed becase the timezone
info can't be retrieved from the browser apis (except for en-US locale
on some but not all browsers). For this reason we don't want to support
this flag at all.

Related to this, since the 'long' and 'longtime' datetime formats require
the 'z' flag in the formatting string, we are removing support for this
format as well.
2011-08-14 23:44:21 -07:00
Di Peng 966cbd4cf8 feat(i18n): collect and convert locale info from closure
- add i18n/closure directory with closure i18n files and
  update-closure.sh script to update them
- generate.sh script runs node.js scripts that extract localization
  rules from the closure library, transform them to a more suitable
format and dumps them into i18n/locale directory as angular's $locale
services
- update Rakefile to copy i18n files to build/ and pkg/ dirs
- copy i18n stuff during rake build
- e2e tests for several locales
2011-08-14 23:44:20 -07:00
Di Peng 8534b7c7c0 refactor(date,curreny,number): inject and use $locale in filters
- filter.number, filter.currency and filter.date are injected with
$locale service so that we can just swap the service to localize these
- date filter was beefed up in order to support literal strings found in
  localization rules
2011-08-14 23:44:20 -07:00
Di Peng 6802a76007 feat($locale): add default locale service for en-US 2011-08-14 23:44:20 -07:00
Di Peng 7ec8a89362 fix(directives): make ng:class-even/odd work with ng:class
Closes #508
2011-08-14 22:46:51 -07:00
Misko Hevery 34f174066f refactor(scope): non-recursive $digest method 2011-08-14 21:32:15 -07:00
Misko Hevery 530dc412c4 refactor(scope): use double-linked-list for children
Much faster $destroy operations for large ng:repeat sets.
2011-08-14 21:32:13 -07:00
Misko Hevery 3f99cdbdc3 feat(scope): $evalAsync support 2011-08-12 16:18:41 -07:00
Misko Hevery 13e7df68a6 perf(scope): re-enable statement cacheing 2011-08-12 15:48:12 -07:00
Misko Hevery 42062dab34 refactor(scope): remove $flush/$observe ng:eval/ng:eval-order 2011-08-12 15:47:47 -07:00
Misko Hevery 1c9fc1e1de fix(scope): rerun $digest from root, rather then per scope. 2011-08-12 15:47:44 -07:00
Misko Hevery 8bc7beacd8 fix(bootstrap): missing var failed strict mode boot 2011-08-12 10:19:28 -07:00
Vojta Jina 842741ee99 doc($browser): remove duplication of $browser to docs
This was causing to show up the "$browser" twice in the menu.
2011-08-10 11:51:24 +02:00
Vojta Jina 40ad543d27 doc($browser): hide $browser.notifyWhenNoOustandingRequest method
Closes #506
2011-08-10 11:50:15 +02:00
Igor Minar 06835a462a style($function): replace $function with 'function' 2011-08-06 01:54:06 -07:00
Di Peng 142cffcf64 refactor(widgets): remove input[button, submit, reset, image] and button windgets
These widgets are useless and only trigger extra $updateViews.

The only reason we had them was to support ng:change on these widgets,
but since there are no bindings present in these cases it doesn't make
sense to support ng:change here. It's likely just a leftover from
getangular.com

Breaking change: ng:change for input[button], input[submit], input[reset], input[image]
and button widgets is not supported any more
2011-08-06 01:54:05 -07:00
Di Peng 862d78c1d9 doc(xhr): add e2e test for JSONP error handling
- add e2e tests
- refactor the example by removing clear button and simplifying the code
2011-08-06 01:54:05 -07:00
Di Peng 6f8904e027 feat($browser): JSONP error handling
since we don't know if the error was due to a client error (4xx) or
server error (5xx), we leave the status code as undefined.
2011-08-06 01:54:05 -07:00
Igor Minar 4dc9e6416a doc(tutorial): updates needed for 0.9.18 rebase 2011-08-04 10:48:17 -07:00
DiPeng 4f6e947e49 fix(docs): fix qfs.read() encoding issue
- must use binary reading when using read function in q-fs module
otherwise some unicode character may be garbled.

Closes #497
2011-08-03 16:50:25 -07:00
Vojta Jina 15efbbdc1f fix($xhr.error): fix docs and add missed breaking change
$xhr.error's first argument (request) has no callback property anymore,
it's called success now...

This breaking change was introduced by b5594a773a
2011-08-02 19:01:36 +02:00
DiPeng 67a3315e1d refactor(angular): remove unnecessary parameter for slice function
- the end index for slice, if not specified, is default to the
end of the array it operates on.
2011-08-02 07:11:47 -07:00
Misko Hevery 8f0dcbab80 feat(scope): new and improved scope implementation
- Speed improvements (about 4x on flush phase)
- Memory improvements (uses no function closures)
- Break $eval into $apply, $dispatch, $flush
- Introduced $watch and $observe

Breaks angular.equals() use === instead of ==
Breaks angular.scope() does not take parent as first argument
Breaks scope.$watch() takes scope as first argument
Breaks scope.$set(), scope.$get are removed
Breaks scope.$config is removed
Breaks $route.onChange callback has not "this" bounded
2011-08-02 01:00:03 +02:00
dandoyon 1f4b417184 doc(typos): fix couple of typos in the docs
Minor documentation fixes. Should not be any code changes.
One test changed due to dependency on text in documentation.
2011-07-30 16:41:42 +02:00
Igor Minar 2d8d5aef29 prepare the 0.9.19 canine-psychokinesis iteration 2011-07-29 20:06:32 -07:00
Igor Minar eb758bc605 fix(Rakefile): index-jq.html needs to be rewritten like index.html 2011-07-29 19:35:27 -07:00
Igor Minar 761997e082 doc(release notes): small fixes for the 0.9.18 release 2011-07-29 19:34:22 -07:00
297 changed files with 18478 additions and 3998 deletions
Generated
-67
View File
@@ -1,67 +0,0 @@
IMPORTANT: THIS IS TO CERTIFY THE RIGHT TO USE THE JETBRAINS SOFTWARE PRODUCT, GRANTED BY JETBRAINS S.R.O. UNDER THE TERMS AND CONDITIONS OF THE LICENSE AGREEMENT INCLUDED WITH THE SOFTWARE. PLEASE SAVE A COPY OF THIS EMAIL FOR FUTURE REFERENCES.
========LICENSE DETAILS========
Type: Open Source License
Reference No*: LC-93161-D352729080
Date of Issue: 3 November 2010
Expiration Date: 3 November 2011
Number of Authorized Users: not limited
* Please quote this reference when contacting JetBrains
===========LICENSEE============
Name: angularjs
Customer ID: 93161
Address:
=======SOFTWARE PRODUCT========
Product Name: WebStorm
Licensed Version: 1.0 and any new product release which is made generally available before 3 November 2011
The software is shipped electronically and is available for download from:
http://www.jetbrains.com/webstorm/download/
Your WebStorm license includes a 1-year upgrade subscription qualifying you for free upgrades to any new versions of WebStorm released by JetBrains during your upgrade subscription period starting on your license issue date and ending on 3 November 2011. To check availability of the new versions of WebStorm, please visit http://www.jetbrains.com.
For running any new version of WebStorm released by JetBrains during your upgrade subscription period, please use the included below licensing details.
You can renew your upgrade subscription before or after its expiration. Your new subscription period will start on the date following the expiration date of your current upgrade subscription.
=========INSTALLATION==========
Run WebStorm and follow the Installation Wizard's instructions. To register for use of the software or change your existing registration details, go to Help/Register menu of the software and enter the included below the User Name and License Key(s) into the registration dialog:
User Name: angularjs
===== LICENSE BEGIN =====
93161-03112010
00000jBsEx59XVlc79fV"aAqWXQ09e
jQsg5TNp5X4HGhc10LNBdu!!ejRcFG
7h3S6T09YcRWs23TH0RgaM87!HqmQo
===== LICENSE END =====
===DOCUMENTATION AND SUPPORT===
WebStorm documentation:
http://www.jetbrains.com/webstorm/documentation/
Available support resources:
http://www.jetbrains.com/support/
Technical support contact:
support@jetbrains.com
Contact for the license renewal requests:
opensource@jetbrains.com
For questions, please contact:
sales@jetbrains.com
JetBrains Sales Team
http://www.jetbrains.com
"Develop with pleasure!"
-9
View File
@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
-5
View File
@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
</project>
-11
View File
@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DependencyValidationManager">
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
</component>
<component name="ProjectRootManager" version="2" />
<component name="SvnBranchConfigurationManager">
<option name="mySupportsUserInfoFilter" value="true" />
</component>
</project>
-9
View File
@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/angular.js.iml" filepath="$PROJECT_DIR$/.idea/angular.js.iml" />
</modules>
</component>
</project>
-68
View File
@@ -1,68 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS">
<value>
<option name="USE_SAME_INDENTS" value="true" />
<option name="OTHER_INDENT_OPTIONS">
<value>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="2" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
</value>
</option>
<ADDITIONAL_INDENT_OPTIONS fileType="js">
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
<ADDITIONAL_INDENT_OPTIONS fileType="jsp">
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
<ADDITIONAL_INDENT_OPTIONS fileType="sass">
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
<ADDITIONAL_INDENT_OPTIONS fileType="xml">
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
<ADDITIONAL_INDENT_OPTIONS fileType="yml">
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
</value>
</option>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</component>
</project>
-15
View File
@@ -1,15 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="gen_docs" type="BashConfigurationType" factoryName="Bash">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="INTERPRETER_PATH" value="/bin/bash" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="PARENT_ENVS" value="true" />
<envs />
<module name="angular.js" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/gen_docs.sh" />
<option name="PARAMETERS" value="" />
<RunnerSettings RunnerId="BashRunner" />
<ConfigurationWrapper RunnerId="BashRunner" />
<method />
</configuration>
</component>
-15
View File
@@ -1,15 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="rake compile" type="BashConfigurationType" factoryName="Bash">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="INTERPRETER_PATH" value="/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="PARENT_ENVS" value="true" />
<envs />
<module name="angular.js" />
<option name="SCRIPT_NAME" value="/usr/bin/rake" />
<option name="PARAMETERS" value="compile" />
<RunnerSettings RunnerId="BashRunner" />
<ConfigurationWrapper RunnerId="BashRunner" />
<method />
</configuration>
</component>
Generated
-7
View File
@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
+119 -1
View File
@@ -1,3 +1,107 @@
- The Latest Stable Release: <a href="#0.9.19">0.9.19 canine-psychokinesis</a>
- The Latest Unstable Release: <a href="#0.10.1">0.10.1 chicken-hands</a>
<a name="0.10.1"><a/>
# 0.10.1 inexorable-juggernaut (2011-09-09) #
## Features
- complete rewrite of the $location service with HTML5 support, many API and semantic changes.
Please see:
- [$location service API docs](http://docs-next.angularjs.org/#!/api/angular.service.$location)
- [$location service dev guide article](http://docs-next.angularjs.org/#!/guide/dev_guide.services.$location)
- [location.js source file](https://github.com/angular/angular.js/blob/master/src/service/location.js)
- breaking changes section of this changelog
## Bug Fixes
- $xhr should not covert HTTP status 0 to 200
([commit](https://github.com/angular/angular.js/commit/b0eb831bce7d0ea066fd0758124793ed3db6d692))
- fixed several doc examples that were broken on IE
- ng:change should be called after the new val is set
(Issue [#547](https://github.com/angular/angular.js/issues/547))
- currency filter should return an empty string for non-numbers
## Breaking Changes
- $location related changes - for complete list of api changes see:
[Migrating from earlier AngularJS releases](http://docs-next.angularjs.org/#!/guide/dev_guide.services.$location)
- $location api changes:
- $location.href -> $location.absUrl()
- $location.hash -> $location.url()
- $location.hashPath -> $location.path()
- $location.hashSearch -> $location.search()
- $location.search -> no equivalent, use $window.location.search (this is so that we can work in
hashBang and html5 mode at the same time, check out the docs)
- $location.update() / $location.updateHash() -> use $location.url()
- n/a -> $location.replace() - new api for replacing history record instead of creating a new one
- $location semantic changes:
- all url pieces are always in sync ($location.path(), $location.url(), $location.search(), ...) -
this was previously true only if you used update* methods instead of direct assignment
($location.hashPath = 'foo')
- we now use (window.history.pushState || onHashChange event || polling) for detecting url changes
in the browser (we use the best one available).
<a name="0.10.0"><a/>
# 0.10.0 chicken-hands (2011-09-02) #
## Features
- complete rewrite of the Scope implementation with several API and semantic changes. Please see:
- [angular.scope API docs](http://docs-next.angularjs.org/#!/api/angular.scope)
- [scopes dev guide article](http://docs-next.angularjs.org/#!/guide/dev_guide.scopes)
- [scope.js source file](https://github.com/angular/angular.js/blob/master/src/Scope.js)
- breaking changes section of this changelog
- added event system to scopes (see [$on], [$emit] and [$broadcast])
- added i18n and l10n support for date, currency and number filters see [i18n] docs for more info
- added localizable [ng:pluralize] widget
- added [ng:cloak] directive for hiding uncompiled templates
## Bug Fixes
- make [ng:class] friendly towards other code adding/removing classes
([commit](https://github.com/angular/angular.js/commit/2a8fe56997fddbad673748ce02abf649a709c4ca))
- several [jqLite] bugfixes and improvements
- [ng:href], [ng:src] and friends now work properly when no expression is present in the attribute
value.
(Issue [#534](https://github.com/angular/angular.js/issues/534))
- expose missing [lowercase], [uppercase] and [isDate] APIs.
## Docs
- many (but not all just yet) api docs were proof-read and improved
## Breaking Changes:
- many scope related changes:
- $onEval is no more (use $watch with a fn as the only param if you really miss it)
- $eval without params doesn't trigger model mutation observations (use $apply/$digest instead)
- $digest propagates through the scope tree automatically (this is the desired behavior anyway)
- $watch various API changes
- scope is now the first argument passed into the $watch listener
- `this` in the $watch listener is undefined instead of current scope
- objects and arrays are watched and compared by equality and not just identity
- the initial execution of the $watch listener now executes asynchronously with respect to the
code registering it via $watch
- exceptionHandler argument is no more
- initRun argument is no more
- angular.scope does not create child scopes by taking parent as the first argument - use $new
instead
- scope.$set and scope.$get were removed, use direct property assignment instead or $eval
- $route.onChange was removed and replaced with $beforeRouteChange, $afterRouteChange and
$routeUpdate events that can be used together with the new $routeParams service
- `angular.equals()` now uses `===` instead of `==` when comparing primitives
<a name="0.9.19"><a/>
# 0.9.19 canine-psychokinesis (2011-08-20) #
@@ -12,7 +116,9 @@
([commit](https://github.com/angular/angular.js/commit/e004378d100ce767a1107180102790a9a360644e))
## Fixes
## Bug Fixes
- fixed memory leak found in [ng:options] directive
([commit](https://github.com/angular/angular.js/commit/6aa04b1db48853340d720e0a1a3e325ac523a06f))
- make ng:class-even/odd compatible with ng:class
(Issue [#508](https://github.com/angular/angular.js/issues/508))
- fixed error handling for resources that didn't work in certain situations
@@ -640,6 +746,9 @@ with the `$route` service
[lowercase]: http://docs.angularjs.org/#!/api/angular.lowercase
[uppercase]: http://docs.angularjs.org/#!/api/angular.uppercase
[isDate]: http://docs.angularjs.org/#!/api/angular.isDate
[scope]: http://docs.angularjs.org/#!/api/angular.scope
[compile]: http://docs.angularjs.org/#!/api/angular.compile
[element]: http://docs.angularjs.org/#!/api/angular.element
@@ -655,6 +764,9 @@ with the `$route` service
[ng:readonly]: http://docs.angularjs.org/#!/api/angular.directive.ng:readonly
[ng:show]: http://docs.angularjs.org/#!/api/angular.directive.ng:show
[ng:hide]: http://docs.angularjs.org/#!/api/angular.directive.ng:hide
[ng:class]: http://docs.angularjs.org/#!/api/angular.directive.ng:class
[ng:src]: http://docs.angularjs.org/#!/api/angular.directive.ng:src
[ng:href]: http://docs.angularjs.org/#!/api/angular.directive.ng:href
[$defer]: http://docs.angularjs.org/#!/api/angular.service.$defer
[$cookies]: http://docs.angularjs.org/#!/api/angular.service.$cookies
[$xhr]: http://docs.angularjs.org/#!/api/angular.service.$xhr
@@ -673,3 +785,9 @@ with the `$route` service
[jqLite]: http://docs.angularjs.org/#!/api/angular.element
[angular.version]: http://docs.angularjs.org/#!/api/angular.version
[Jstd Scenario Adapter]: https://github.com/angular/angular.js/blob/master/src/jstd-scenario-adapter/Adapter.js
[i18n]: http://docs-next.angularjs.org/#!/guide/dev_guide.i18n
[ng:pluralize]: http://docs-next.angularjs.org/#!/api/angular.widget.ng:pluralize
[ng:cloak]: http://docs-next.angularjs.org/#!/api/angular.directive.ng:cloak
[$on]: http://docs-next.angularjs.org/#!/api/angular.scope.$on
[$emit]: http://docs-next.angularjs.org/#!/api/angular.scope.$emit
[$broadcast]: http://docs-next.angularjs.org/#!/api/angular.scope.$broadcast
+6 -1
View File
@@ -27,12 +27,14 @@ ANGULAR = [
'src/service/log.js',
'src/service/resource.js',
'src/service/route.js',
'src/service/updateView.js',
'src/service/routeParams.js',
'src/service/sniffer.js',
'src/service/window.js',
'src/service/xhr.bulk.js',
'src/service/xhr.cache.js',
'src/service/xhr.error.js',
'src/service/xhr.js',
'src/service/locale.js',
'src/directives.js',
'src/markups.js',
'src/widgets.js',
@@ -217,6 +219,8 @@ task :compile => [:init, :compile_scenario, :compile_jstd_scenario_adapter, :gen
--language_in ECMASCRIPT5_STRICT \
--js #{path_to('angular.js')} \
--js_output_file #{path_to('angular.min.js')})
FileUtils.cp_r 'i18n/locale', path_to('i18n')
end
@@ -252,6 +256,7 @@ task :package => [:clean, :compile, :docs] do
FileUtils.cp(src, pkg_dir + '/' + dest)
end
FileUtils.cp_r path_to('i18n'), "#{pkg_dir}/i18n-#{NG_VERSION.full}"
FileUtils.cp_r path_to('docs'), "#{pkg_dir}/docs-#{NG_VERSION.full}"
File.open("#{pkg_dir}/docs-#{NG_VERSION.full}/index.html", File::RDWR) do |f|
+4
View File
@@ -1,5 +1,9 @@
@charset "UTF-8";
[ng\:cloak], .ng-cloak {
display: none;
}
.ng-format-negative {
color: red;
}
-1
View File
@@ -21,7 +21,6 @@ exceptions
* {@link angular.service.$resource $resource } - Creates objects for interacting with RESTful
server-side data sources
* {@link angular.service.$route $route } - Provides deep-linking services
* {@link angular.service.$updateView $updateView } - Queues view updates
* {@link angular.service.$window $window } - References the browsers `window` object
* {@link angular.service.$xhr $xhr} - Generates an XHR request.
+1 -1
View File
@@ -53,7 +53,7 @@ to retrieve Buzz activity and comments.
</div>
</doc:source>
<doc:scenario>
it('fetch buzz and expand', function() {
xit('fetch buzz and expand', function() {
element(':button:contains(fetch)').click();
expect(repeater('div.buzz').count()).toBeGreaterThan(0);
element('.buzz a:contains(Expand replies):first').click();
+6 -4
View File
@@ -43,7 +43,7 @@ The two partials are defined in the following URLs:
AppCntl.$inject = ['$route']
function AppCntl($route) {
// define routes
$route.when("", {template:'./examples/welcome.html', controller:WelcomeCntl});
$route.when("/welcome", {template:'./examples/welcome.html', controller:WelcomeCntl});
$route.when("/settings", {template:'./examples/settings.html', controller:SettingsCntl});
$route.parent(this);
@@ -61,7 +61,9 @@ The two partials are defined in the following URLs:
}
};
function SettingsCntl(){
SettingsCntl.$inject = ['$location'];
function SettingsCntl($location){
this.$location = $location;
this.cancel();
}
SettingsCntl.prototype = {
@@ -71,13 +73,13 @@ The two partials are defined in the following URLs:
save: function(){
angular.copy(this.form, this.person);
window.location.hash = "#";
this.$location.path('/welcome');
}
};
</script>
<div ng:controller="AppCntl">
<h1>Your App Chrome</h1>
[ <a href="#">Welcome</a> | <a href="#/settings">Settings</a> ]
[ <a href="#!/welcome">Welcome</a> | <a href="#!/settings">Settings</a> ]
<hr/>
<span style="background-color: blue; color: white; padding: 3px;">
Partial: {{$route.current.template}}
+3 -5
View File
@@ -26,7 +26,7 @@ no connection between the controller and the view.
'cursor': 'pointer'
};
this.reset();
this.$watch('$location.hashSearch.board', this.readUrl);
this.$watch('$location.search().board', this.readUrl);
}
TicTacToeCntl.prototype = {
dropPiece: function(row, col) {
@@ -62,9 +62,9 @@ no connection between the controller and the view.
angular.forEach(this.board, function(row){
rows.push(row.join(','));
});
this.$location.hashSearch.board = rows.join(';') + '/' + this.nextMove;
this.$location.search({board: rows.join(';') + '/' + this.nextMove});
},
readUrl: function(value) {
readUrl: function(scope, value) {
if (value) {
value = value.split('/');
this.nextMove = value[1];
@@ -72,8 +72,6 @@ no connection between the controller and the view.
this.board[col] = row.split(',');
}, this);
this.grade();
} else {
this.reset();
}
}
};
@@ -15,12 +15,11 @@ explicitly.
<!doctype html>
<html xmlns:ng="http://angularjs.org">
<head>
<script type="text/javascript" src="http://code.angularjs.org/angular.js"
ng:autobind></script>
<script type="text/javascript">
(angular.element(document).ready(function() {
<script src="http://code.angularjs.org/angular.js"></script>
<script>
angular.element(document).ready(function() {
angular.compile(document)();
})(document);
});
</script>
</head>
<body>
+124
View File
@@ -0,0 +1,124 @@
@ngdoc overview
@name Developer Guide: i18n and l10n
@description
# I18n and L10n in AngularJS
**What is i18n and l10n?**
Internationalization, abbreviated i18n, is the process of developing products in such a way that
they can be localized for languages and cultures easily. Localization, abbreviated l10n, is the
process of adapting applications and text to enable their usability in a particular cultural or
linguistic market. For application developers, internationalizing an application means abstracting
all of the strings and other locale-specific bits (such as date or currency formats) out of the
application. Localizing an application means providing translations and localized formats for the
abstracted bits.
**What level of support for i18n/l10n is currently in Angular?**
Currently, Angular supports i18n/l10n for {@link
http://docs.angularjs.org/#!/api/angular.filter.date datetime}, {@link
http://docs.angularjs.org/#!/api/angular.filter.number number} and {@link
http://docs.angularjs.org/#!/api/angular.filter.currency currency} filters.
Additionally, Angular supports localizable pluralization support provided by the {@link
api/angular.widget.ng:pluralize ng:pluralize widget}.
All localizable Angular components depend on locale-specific rule sets managed by the {@link
api/angular.service.$locale $locale service}.
For readers who want to jump straight into examples, we have a few web pages that showcase how to
use Angular filters with various locale rule sets. You can find these examples either on {@link
https://github.com/angular/angular.js/tree/master/i18n/e2e Github} or in the i18n/e2e folder of
Angular development package.
**What is a locale id?**
A locale is a specific geographical, political, or cultural region. The most commonly used locale
ID consists of two parts: language code and country code. For example, en-US, en-AU, zh-CN are all
valid locale IDs that have both language codes and country codes. Because specifying a country code
in locale ID is optional, locale IDs such as en, zh, and sk are also valid. See the {@link
http://userguide.icu-project.org/locale ICU } website for more information about using locale IDs.
**Supported locales in Angular**
Angular separates number and datetime format rule sets into different files, each file for a
particular locale. You can find a list of currently supported locales {@link
https://github.com/angular/angular.js/tree/master/i18n/locale here}
# Providing locale rules to Angular
There are two approaches to providing locale rules to Angular:
**1. Pre-bundled rule sets**
You can pre-bundle the desired locale file with Angular by concatenating the content of the
locale-specific file to the end of `angular.js` or `angular.min.js` file.
For example on *nix, to create a an angular.js file that contains localization rules for german
locale, you can do the following:
`cat angular.js i18n/angular-locale_de-ge.js > angular_de-ge.js`
When the application containing `angular_de-ge.js` script instead of the generic angular.js script
starts, Angular is automatically pre-configured with localization rules for the german locale.
**2. Including locale js script in index.html page**
You can also include the locale specific js file in the index.html page. For example, if one client
requires German locale, you would serve index_de-ge.html which will look something like this:
<pre>
<html>
<head>
….
<script src="angular.js" ng:autobind></script>
<script src="i18n/angular-locale_de-ge.js"></script>
….
</head>
</html>
</pre>
**Comparison of the two approaches**
Both approaches described above requires you to prepare different index.html pages or js files for
each locale that your app may be localized into. You also need to configure your server to serve
the correct file that correspond to the desired locale.
However, the second approach (Including locale js script in index.html page) is likely to be slower
because an extra script needs to be loaded.
# "Gotchas"
**Currency symbol "gotcha"**
Angular's {@link http://docs.angularjs.org/#!/api/angular.filter.currency currency filter} allows
you to use the default currency symbol from the {@link api/angular.service.$locale locale service},
or you can provide the filter with a custom currency symbol. If your app will be used only in one
locale, it is fine to rely on the default currency symbol. However, if you anticipate that viewers
in other locales might use your app, you should provide your own currency symbol to make sure the
actual value is understood.
For example, if you want to display account balance of 1000 dollars with the following binding
containing currency filter: `{{ 1000 | currency }}`, and your app is currently in en-US locale.
'$1000.00' will be shown. However, if someone in a different local (say, Japan) views your app, her
browser will specify the locale as ja, and the balance of '¥1000.00' will be shown instead. This
will really upset your client.
In this case, you need to override the default currency symbol by providing the {@link
http://docs.angularjs.org/#!/api/angular.filter.currency currency filter} with a currency symbol as
a parameter when you configure the filter, for example, {{ 1000 | currency:"USD$"}}. This way,
Angular will always show a balance of 'USD$1000' and disregard any locale changes.
**Translation length "gotcha"**
Keep in mind that translated strings/datetime formats can vary greatly in length. For example,
`June 3, 1977` will be translated to Spanish as `3 de junio de 1977`. There are bound to be other
more extreme cases. Hence, when internationalizing your apps, you need to apply CSS rules
accordingly and do thorough testing to make sure UI components do not overlap.
**Timezones**
Keep in mind that Angular datetime filter uses the time zone settings of the browser. So the same
application will show different time information depending on the time zone settings of the
computer that the application is running on. Neither Javascript nor Angular currently supports
displaying the date with a timezone specified by the developer.
@@ -1,39 +0,0 @@
@workInProgress
@ngdoc overview
@name Developer Guide: Scopes: Applying Controllers to Scopes
@description
When a controller function is applied to a scope, the scope is augmented with the behavior defined
in the controller. The end result is that the scope behaves as if it were the controller:
<pre>
var scope = angular.scope();
scope.salutation = 'Hello';
scope.name = 'World';
expect(scope.greeting).toEqual(undefined);
scope.$watch('name', function(){
this.greeting = this.salutation + ' ' + this.name + '!';
});
expect(scope.greeting).toEqual('Hello World!');
scope.name = 'Misko';
// scope.$eval() will propagate the change to listeners
expect(scope.greeting).toEqual('Hello World!');
scope.$eval();
expect(scope.greeting).toEqual('Hello Misko!');
</pre>
## Related Topics
* {@link dev_guide.scopes Angular Scope Objects}
* {@link dev_guide.scopes.understanding_scopes Understanding Angular Scopes}
* {@link dev_guide.scopes.working_scopes Working With Angular Scopes}
* {@link dev_guide.scopes.updating_scopes Updating Angular Scopes}
## Related API
* {@link api/angular.scope Angular Scope API}
@@ -0,0 +1,225 @@
@ngdoc overview
@name Developer Guide: Scopes: Scope Internals
@description
## What is a scope?
A scope is an execution context for {@link dev_guide.expressions expressions}. You can think of a
scope as a JavaScript object that has an extra set of APIs for registering change listeners and for
managing its own life cycle. In Angular's implementation of the model-view-controller design
pattern, a scope's properties comprise both the model and the controller methods.
### Scope characteristics
- Scopes provide APIs ({@link api/angular.scope.$watch $watch}) to observe model mutations.
- Scopes provide APIs ({@link api/angular.scope.$apply $apply}) to propagate any model changes
through the system into the view from outside of the "Angular realm" (controllers, services,
Angular event handlers).
- Scopes can be nested to isolate application components while providing access to shared model
properties. A scope (prototypically) inherits properties from its parent scope.
- In some parts of the system (such as controllers, services and directives), the scope is made
available as `this` within the given context. (Note: This api will change before 1.0 is released.)
### Root scope
Every application has a root scope, which is the ancestor of all other scopes. The root scope is
responsible for creating the injector which is assigned to the {@link api/angular.scope.$service
$service} property, and initializing the services.
### What is scope used for?
{@link dev_guide.expressions Expressions} in the view are {@link api/angular.scope.$eval evaluated}
against the current scope. When HTML DOM elements are attached to a scope, expressions in those
elements are evaluated against the attached scope.
There are two kinds of expressions:
- Binding expressions, which are observations of property changes. Property changes are reflected
in the view during the {@link api/angular.scope.$digest digest cycle}.
- Action expressions, which are expressions with side effects. Typically, the side effects cause
execution of a method in a controller in response to a user action, such as clicking on a button.
### Scope inheritance
A scope (prototypically) inherits properties from its parent scope. Since a given property may not
reside on a child scope, if a property read does not find the property on a scope, the read will
recursively check the parent scope, grandparent scope, etc. all the way to the root scope before
defaulting to undefined.
{@link api/angular.directive Directives} associated with elements (ng:controller, ng:repeat,
ng:include, etc.) create new child scopes that inherit properties from the current parent scope.
Any code in Angular is free to create a new scope. Whether or not your code does so is an
implementation detail of the directive, that is, you can decide when or if this happens.
Inheritance typically mimics HTML DOM element nesting, but does not do so with the same
granularity.
A property write will always write to the current scope. This means that a write can hide a parent
property within the scope it writes to, as shown in the following example.
<pre>
var root = angular.scope();
var child = root.$new();
root.name = 'angular';
expect(child.name).toEqual('angular');
expect(root.name).toEqual('angular');
child.name = 'super-heroic framework';
expect(child.name).toEqual('super-heroic framework');
expect(root.name).toEqual('angular');
</pre>
### Scope life cycle
1. **Creation**
* You can create the root scope via {@link api/angular.scope angular.scope()}.
* To create a child scopes, you should call {@link api/angular.scope.$new parentScope.$new()}.
2. **Watcher registration**
Watcher registration can happen at any time and on any scope (root or child) via {@link
api/angular.scope.$watch scope.$watch()} API.
3. **Model mutation**
For mutations to be properly observed, you should make them only within the execution of the
function passed into {@link api/angular.scope.$apply scope.$apply()} call. (Angular apis do this
implicitly, so no extra `$apply` call is needed when doing synchronous work in controllers, or
asynchronous work with {@link api/angular.service.$xhr $xhr} or {@link api/angular.service.$defer
$defer} services.
4. **Mutation observation**
At the end of each `$apply` call {@link api/angular.scope.$digest $digest} cycle is started on
the root scope, which then propagates throughout all child scopes.
During the `$digest` cycle, all `$watch-ers` expressions or functions are checked for model
mutation and if a mutation is detected, the `$watch-er` listener is called.
5. **Scope destruction**
When child scopes are no longer needed, it is the responsibility of the child scope creator to
destroy them via {@link api/angular.scope.$destroy scope.$destroy()} API. This will stop
propagation of `$digest` calls into the child scope and allow for memory used by the child scope
models to be reclaimed by the garbage collector.
The root scope can't be destroyed via the `$destroy` API. Instead, it is enough to remove all
references from your application to the scope object and garbage collector will do its magic.
## Scopes in Angular applications
To understand how Angular applications work, you need to understand how scopes work within an
application. This section describes the typical life cycle of an application so you can see how
scopes come into play throughout and get a sense of their interactions.
### How scopes interact in applications
1. At application compile time, a root scope is created and is attached to the root `<HTML>` DOM
element.
1. The root scope creates an {@link api/angular.injector injector} which is assigned to the
{@link api/angular.scope.$service $service} property of the root scope.
2. Any eager {@link api/angular.scope.$service services} are initialized at this point.
2. During the compilation phase, the {@link dev_guide.compiler compiler} matches {@link
api/angular.directive directives} against the DOM template. The directives usually fall into one of
two categories:
- Observing {@link api/angular.directive directives}, such as double-curly expressions
`{{expression}}`, register listeners using the {@link api/angular.scope.$watch $watch()} method.
This type of directive needs to be notified whenever the expression changes so that it can update
the view.
- Listener directives, such as {@link api/angular.directive.ng:click ng:click}, register a
listener with the DOM. When the DOM listener fires, the directive executes the associated
expression and updates the view using the {@link api/angular.scope.$apply $apply()} method.
3. When an external event (such as a user action, timer or XHR) is received, the associated {@link
dev_guide.expressions expression} must be applied to the scope through the {@link
api/angular.scope.$apply $apply()} method so that all listeners are updated correctly.
### Directives that create scopes
In most cases, {@link api/angular.directive directives} and scopes interact but do not create new
instances of scope. However, some directives, such as {@link api/angular.directive.ng:controller
ng:controller} and {@link api/angular.widget.@ng:repeat ng:repeat}, create new child scopes using
the {@link api/angular.scope.$new $new()} method and then attach the child scope to the
corresponding DOM element. You can retrieve a scope for any DOM element by using an
`angular.element(aDomElement).scope()` method call.)
### Controllers and scopes
Scopes and controllers interact with each other in the following situations:
- Controllers use scopes to expose controller methods to templates (see {@link
api/angular.directive.ng:controller ng:controller}).
- Controllers define methods (behavior) that can mutate the model (properties on the scope).
- Controllers may register {@link api/angular.scope.$watch watches} on the model. These watches
execute immediately after the controller behavior executes, but before the DOM gets updated.
See the {@link dev_guide.mvc.understanding_controller controller docs} for more information.
### Updating scope properties
You can update a scope by calling its {@link api/angular.scope.$apply $apply()} method with an
expression or a function as the function argument. However it is typically not necessary to do this
explicitly. In most cases, angular intercepts all external events (such as user interactions, XHRs,
and timers) and wraps their callbacks into the `$apply()` method call on the scope object for you
at the right time. The only time you might need to call `$apply()` explicitly is when you create
your own custom asynchronous widget or service.
The reason it is unnecessary to call `$apply()` from within your controller functions when you use
built-in angular widgets and services is because your controllers are typically called from within
an `$apply()` call already.
When a user inputs data, angularized widgets invoke `$apply()` on the current scope and evaluate an
angular expression or execute a function on this scope. Afterwards `$apply` will trigger `$digest`
call on the root scope, to propagate your changes through the entire system, which results in
$watch-ers firing and view getting updated. Similarly, when a request to fetch data from a server
is made and the response comes back, the data is written into the model (scope) within an $apply,
which then pushes updates through to the view and any other dependents.
A widget that creates scopes (such as {@link api/angular.widget.@ng:repeat ng:repeat}) via `$new`,
doesn't need to worry about propagating the `$digest` call from the parent scope to child scopes.
This happens automatically.
## Scopes in unit-testing
You can create scopes, including the root scope, in tests using the {@link api/angular.scope
angular.scope()} API. This allows you to mimic the run-time environment and have full control over
the life cycle of the scope so that you can assert correct model transitions. Since these scopes
are created outside the normal compilation process, their life cycles must be managed by the test.
### Using scopes in unit-testing
The following example demonstrates how the scope life cycle needs to be manually triggered from
within the unit-tests.
<pre>
// example of a test
var scope = angular.scope();
scope.$watch('name', function(scope, name){
scope.greeting = 'Hello ' + name + '!';
});
scope.name = 'angular';
// The watch does not fire yet since we have to manually trigger the digest phase.
expect(scope.greeting).toEqual(undefined);
// manually trigger digest phase from the test
scope.$digest();
expect(scope.greeting).toEqual('Hello Angular!');
</pre>
### Dependency injection in Tests
When you find it necessary to inject your own mocks in your tests, use a scope to override the
service instances, as shown in the following example.
<pre>
var myLocation = {};
var scope = angular.scope(angular.service, {$location: myLocation});
expect(scope.$service('$location')).toEqual(myLocation);
</pre>
## Related Topics
* {@link dev_guide.scopes Angular Scope Objects}
* {@link dev_guide.scopes.understanding_scopes Understanding Scopes}
## Related API
* {@link api/angular.scope Angular Scope API}
+14 -17
View File
@@ -1,36 +1,33 @@
@workInProgress
@ngdoc overview
@name Developer Guide: Angular Scopes
@name Developer Guide: Scopes
@description
An angular scope is a JavaScript type defined by angular. Instances of this type are objects that
serve as the context within which all model and controller methods live and get evaluated.
An Angular scope is a JavaScript object with additional APIs useful for watching property changes,
Angular scope is the model in Model-View-Controller paradigm. Instances of scope serve as the
context within which all {@link dev_guide.expressions expressions} get evaluated.
Angular links scope objects to specific points in a compiled (processed) template. This linkage
provides the contexts in which angular creates data-bindings between the model and the view. You
can think of angular scope objects as the medium through which the model, view, and controller
communicate.
You can think of Angular scope objects as the medium through which the model, view, and controller
communicate. Scopes are linked during the compilation process with the view. This linkage provides
the contexts in which Angular creates data-bindings between the model and the view.
In addition to providing the context in which data is evaluated, angular scope objects watch for
In addition to providing the context in which data is evaluated, Angular scope objects watch for
model changes. The scope objects also notify all components interested in any model changes (for
example, functions registered through {@link api/angular.scope.$watch $watch}, bindings created by
{@link api/angular.directive.ng:bind ng:bind}, or HTML input elements).
Angular scope objects are responsible for:
Angular scope objects:
* Gluing the model, controller and view template together.
* Providing the mechanism to watch for model changes ({@link api/angular.scope.$watch}).
* Notifying interested components when the model changes ({@link api/angular.scope.$eval}).
* Providing the context in which all controller functions and angular expressions are evaluated.
* Link the model, controller and view template together.
* Provide the mechanism to watch for model changes ({@link api/angular.scope.$watch $watch}).
* Apply model changes to the system ({@link api/angular.scope.$apply $apply}).
* Provide the context in which expressions are evaluated ({@link api/angular.scope.$eval $eval}).
## Related Topics
* {@link dev_guide.scopes.understanding_scopes Understanding Scopes}
* {@link dev_guide.scopes.working_scopes Working With Scopes}
* {@link dev_guide.scopes.controlling_scopes Applying Controllers to Scopes}
* {@link dev_guide.scopes.updating_scopes Updating Scopes}
* {@link dev_guide.scopes.internals Scopes Internals}
## Related API
@@ -1,4 +1,3 @@
@workInProgress
@ngdoc overview
@name Developer Guide: Scopes: Understanding Scopes
@description
@@ -27,7 +26,7 @@ code, observe how the value of `name` changes, based on the HTML element it is d
Name = {{name}}!
</li>
</ul>
<pre>Name={{name}}</pre>
<pre>Name={{name}}</pre>
</doc:source>
<doc:scenario>
it('should override the name property', function() {
@@ -60,9 +59,7 @@ The following illustration shows the DOM and angular scopes for the example abov
## Related Topics
* {@link dev_guide.scopes Angular Scope Objects}
* {@link dev_guide.scopes.working_scopes Working With Scopes}
* {@link dev_guide.scopes.controlling_scopes Applying Controllers to Scopes}
* {@link dev_guide.scopes.updating_scopes Updating Scopes}
* {@link dev_guide.scopes.internals Scopes Internals}
## Related API
@@ -1,38 +0,0 @@
@workInProgress
@ngdoc overview
@name Developer Guide: Scopes: Updating Scope Properties
@description
You can update a scope by calling its {@link api/angular.scope.$eval $eval()} method, but usually
you do not have to do this explicitly. In most cases, angular intercepts all external events (such
as user interactions, XHRs, and timers) and calls the `$eval()` method on the scope object for you
at the right time. The only time you might need to call `$eval()` explicitly is when you create
your own custom widget or service.
The reason it is unnecessary to call `$eval()` from within your controller functions when you use
built-in angular widgets and services is because a change in the data model triggers a call to the
`$eval()` method on the scope object where the data model changed.
When a user inputs data, angularized widgets copy the data to the appropriate scope and then call
the `$eval()` method on the root scope to update the view. It works this way because scopes are
inherited, and a child scope `$eval()` overrides its parent's `$eval()` method. Updating the whole
page requires a call to `$eval()` on the root scope as `$root.$eval()`. Similarly, when a request
to fetch data from a server is made and the response comes back, the data is written into the model
and then `$eval()` is called to push updates through to the view and any other dependents.
A widget that creates scopes (such as {@link api/angular.widget.@ng:repeat ng:repeat}) is
responsible for forwarding `$eval()` calls from the parent to those child scopes. That way, calling
`$eval()` on the root scope will update the whole page. This creates a spreadsheet-like behavior
for your app; the bound views update immediately as the user enters data.
## Related Documents
* {@link dev_guide.scopes Angular Scope Objects}
* {@link dev_guide.scopes.understanding_scopes Understanding Angular Scope Objects}
* {@link dev_guide.scopes.working_scopes Working With Angular Scopes}
* {@link dev_guide.scopes.controlling_scopes Applying Controllers to Scopes}
## Related API
* {@link api/angular.scope Angular Scope API}
@@ -1,52 +0,0 @@
@workInProgress
@ngdoc overview
@name Developer Guide: Scopes: Working With Angular Scopes
@description
When you use {@link api/angular.directive.ng:autobind ng:autobind} to bootstrap your application,
angular creates the root scope automatically for you. If you need more control over the
bootstrapping process, or if you need to create a root scope for a test, you can do so using the
{@link api/angular.scope angular.scope()} API.
Here is a simple code snippet that demonstrates how to create a scope object, assign model
properties to it, and register listeners to watch for changes to the model properties:
<pre>
var scope = angular.scope();
scope.salutation = 'Hello';
scope.name = 'World';
// Verify that greeting is undefined
expect(scope.greeting).toEqual(undefined);
// Set up the watcher...
scope.$watch('name', function(){
// when 'name' changes, set 'greeting'...
this.greeting = this.salutation + ' ' + this.name + '!';
}
);
// verify that 'greeting' was set...
expect(scope.greeting).toEqual('Hello World!');
// 'name' changed!
scope.name = 'Misko';
// scope.$eval() will propagate the change to listeners
expect(scope.greeting).toEqual('Hello World!');
scope.$eval();
// verify that '$eval' propagated the change
expect(scope.greeting).toEqual('Hello Misko!');
</pre>
## Related Topics
* {@link dev_guide.scopes Angular Scope Objects}
* {@link dev_guide.scopes.understanding_scopes Understanding Scopes}
* {@link dev_guide.scopes.controlling_scopes Applying Controllers to Scopes}
* {@link dev_guide.scopes.updating_scopes Updating Scopes}
## Related API
* {@link api/angular.scope Angular Scope API}
@@ -0,0 +1,634 @@
@workInProgress
@ngdoc overview
@name Developer Guide: Angular Services: Using $location
@description
# What does it do?
The `$location` service parses the URL in the browser address bar (based on the {@link
https://developer.mozilla.org/en/window.location window.location}) and makes the URL available to
your application. Changes to the URL in the address bar are reflected into $location service and
changes to $location are reflected into the browser address bar.
**The $location service:**
- Exposes the current URL in the browser address bar, so you can
- Watch and observe the URL.
- Change the URL.
- Synchronizes the URL with the browser when the user
- Changes the address bar.
- Clicks the back or forward button (or clicks a History link).
- Clicks on a link.
- Represents the URL object as a set of methods (protocol, host, port, path, search, hash).
## Comparing $location to window.location
<table>
<thead>
<tr>
<td class="empty-corner-lt"></td>
<td>window.location</td>
<td>$location service</td>
</tr>
</thead>
<tbody>
<tr>
<td class="head">purpose</td>
<td>allow read/write access to the current browser location</td>
<td>same</td>
</tr>
<tr>
<td class="head">API</td>
<td>exposes "raw" object with properties that can be directly modified</td>
<td>exposes jQuery-style getters and setters</td>
</tr>
<tr>
<td class="head">integration with angular application life-cycle</td>
<td>none</td>
<td>knows about all internal life-cycle phases, integrates with $watch, ...</td>
</tr>
<tr>
<td class="head">seamless integration with html5 API</td>
<td>no</td>
<td>yes (with a fallback for legacy browsers)</td>
</tr>
<tr>
<td class="head">aware of docroot/context from which the application is loaded</td>
<td>no - window.location.path returns "/docroot/actual/path"</td>
<td>yes - $location.path() returns "/actual/path"</td>
</tr>
</tbody>
</table>
## When should I use $location?
Any time your application needs to react to a change in the current URL or if you want to change
the current URL in the browser.
## What does it not do?
Does not cause a full page reload when the browser URL is changed. To reload the page after
changing the URL, use the lower-level API, `$window.location.href`.
# General overview of the API
The `$location` service can behave differently, depending on the configuration that was provided to
it when it was instantiated. The default configuration is suitable for many applications, for
others customizing the configuration can enable new features.
Once the `$location` service is instantiated, you can interact with it via jQuery-style getter and
setter methods that allow you to get or change the current URL in the browser.
## $location service configuration
To configure the `$location` service, you define the `$config` service which is an object with
configuration properties:
- **html5Mode**: {boolean}<br />
`true` - see Html5 mode<br />
`false` - see Hashbang mode<br />
default: `false`
- **hashPrefix**: {string}<br />
prefix used for Hashbang URLs (used in Hashbang mode or in legacy browser in Html5 mode)<br />
default: `'!'`
### Example configuration
<pre>
angular.service('$config', function() {
return {
html5mode: true,
hashPrefix: '!'
};
});
</pre>
## Getter and setter methods
`$location` service provides getter methods for read-only parts of the URL (absUrl, protocol, host,
port) and getter / setter methods for url, path, search, hash:
<pre>
// get the current path
$location.path();
// change the path
$location.path('/newValue')
</pre>
All of the setter methods return the same `$location` object to allow chaining. For example, to
change multiple segments in one go, chain setters like this:
<pre>$location.path('/newValue').search({key: value});</pre>
All setter methods take an optional boolean flag parameter, which signifies whether current history
record should be replaced or if a new record should be created (default). To change the current URL
without creating a new browser history record you can call:
<pre>$location.path('/newVal', true);</pre>
Note that the setters don't update `window.location` immediately. Instead, `$location` service is
aware of the {@link api/angular.scope scope} life-cycle and coalesces multiple `$location`
mutations into one "commit" to the `window.location` object during the scope `$flush` phase. Since
any of the setters can take the replace flag, it's enough for one setter to use this flag in order
to make the entire "commit" a replace operation rather than addition to the browser history.
### Setters and character encoding
You can pass special characters to `$location` service and it will encode them according to rules
specified in {@link http://www.ietf.org/rfc/rfc3986.txt RFC 3986}. When you access the methods:
- All values that are passed to `$location` setter methods, `path()`, `search()`, `hash()`, are
encoded.
- Getters (calls to methods without parameters) return decoded values for the following methods
`path()`, `search()`, `hash()`.
- When you call the `absUrl()` method, the returned value is a full url with its segments encoded.
- When you call the `url()` method, the returned value is path, search and hash, in the form
`/path?search=a&b=c#hash`. The segments are encoded as well.
# Hashbang and Html5 Modes
`$location` service has two configuration modes which control the format of the URL in the browser
address bar: **Hashbang mode** (the default) and the **Html5 mode** which is based on using the
Html5 {@link http://www.w3.org/TR/html5/history.html History API}. Applications use the same API in
both modes and the `$location` service will work with appropriate URL segments and browser APIs to
facilitate the browser URL change and history management.
<img src="img/guide/hashbang_vs_regular_url.jpg">
<table>
<thead>
<tr>
<td class="empty-corner-lt"></td>
<td>Hashbang mode</td>
<td>Html5 mode</td>
</tr>
</thead>
<tbody>
<tr>
<td class="head">configuration</td>
<td>the default</td>
<td>{ html5Mode: true }</td>
</tr>
<tr>
<td class="head">URL format</td>
<td>hashbang URLs in all browsers</td>
<td>regular URLs in modern browser, hashbang URLs in old browser</td>
</tr>
<tr>
<td class="head">&lt;a href=""&gt; link rewriting</td>
<td>no</td>
<td>yes</td>
</tr>
<tr>
<td class="head">requires server-side configuration</td>
<td>no</td>
<td>yes</td>
</tr>
</tbody>
</table>
## Hashbang mode (default mode)
In this mode, `$location` uses Hashbang URLs in all browsers.
### Example
<pre>
angular.service('$config', function() {
return {
html5Mode: false,
hashPrefix: '!'
};
});
// open http://host.com/base/index.html#!/a
$location.absUrl() == 'http://host.com/base/index.html#!/a'
$location.path() == '/a'
$location.path('/foo')
$location.absUrl() == 'http://host.com/base/index.html#!/foo'
$location.search() == {}
$location.search({a: 'b', c: true});
$location.absUrl() == 'http://host.com/base/index.html#!/foo?a=b&c'
$location.path('/new').search('x=y');
$location.absUrl() == 'http://host.com/base/index.html#!/new?x=y'
</pre>
### Crawling your app
To allow indexing of your AJAX application, you have to add special meta tag in the head section of
your document:
<pre><meta name="fragment" content="!" /></pre>
This will cause crawler bot to request links with `_escaped_fragment_` param so that your server
can recognize the crawler and serve a HTML snapshots. For more information about this technique,
see {@link http://code.google.com/web/ajaxcrawling/docs/specification.html Making AJAX Applications
Crawlable}.
## HTML5 mode
In HTML5 mode, the `$location` service getters and setters interact with the browser URL address
through the HTML5 history API, which allows for use of regular URL path and search segments,
instead of their hashbang equivalents. If the HTML5 History API is not supported by a browser, the
`$location` service will fall back to using the hashbang URLs automatically. This frees you from
having to worry about whether the browser displaying your app supports the history API or not; the
`$location` service transparently uses the best available option.
- Opening a regular URL in a legacy browser -> redirects to a hashbang URL
- Opening hashbang URL in a modern browser -> rewrites to a regular URL
### Example
<pre>
angular.service('$config', function() {
return {
html5Mode: true,
hashPrefix: '!'
};
});
// in browser with html5 history support:
// open http://host.com/#!/a -> rewrite to http://host.com/a
// (replacing the http://host.com/#!/a history record)
$location.path() == '/a'
$location.path('/foo');
$location.absUrl() == 'http://host.com/foo'
$location.search() == {}
$location.search({a: 'b', c: true});
$location.absUrl() == 'http://host.com/foo?a=b&c'
$location.path('/new').search('x=y');
$location.url() == 'new?x=y'
$location.absUrl() == 'http://host.com/new?x=y'
// in browser without html5 history support:
// open http://host.com/new?x=y -> redirect to http://host.com/#!/new?x=y
// (again replacing the http://host.com/new?x=y history item)
$location.path() == '/new'
$location.search() == {x: 'y'}
$location.path('/foo/bar');
$location.path() == '/foo/bar'
$location.url() == '/foo/bar?x=y'
$location.absUrl() == 'http://host.com/#!/foo/bar?x=y'
</pre>
### Fallback for legacy browsers
For browsers that support the HTML5 history API, `$location` uses the HTML5 history API to write
path and search. If the history API is not supported by a browser, `$location` supplies a Hasbang
URL. This frees you from having to worry about whether the browser viewing your app supports the
history API or not; the `$location` service makes this transparent to you.
### Html link rewriting
When you use the history API mode, you will need different links in different browser, but all you
have to do is specify regular URL links, such as: `&lt;a href="/some?foo=bar"&gt;link&lt;/a&gt;`
When a user clicks on this link,
- In a legacy browser, the URL changes to `/index.html#!/some?foo=bar`
- In a modern browser, the URL changes to `/some?foo=bar`
In cases like the following, links are not rewritten; instead, the browser will perform a full page
reload to the original link.
- Links with an `ng:ext-link` directive<br />
Example: `<a href="/ext/link?a=b" ng:ext-link>link</a>`
- Links that contain `target="_blank"`<br />
Example: `<a href="/ext/link?a=b" target="_blank">link</a>`
- Absolute links that go to a different domain<br />
Example: `<a href="http://angularjs.org/">link</a>`
### Server side
Using this mode requires URL rewriting on server side, basically you have to rewrite all your links
to entry point of your application (e.g. index.html)
### Crawling your app
If you want your AJAX application to be indexed by web crawlers, you rill need to add the following
meta tag to the HEAD section of your document:
<pre><meta name="fragment" content="!" /></pre>
This statement causes a crawler to request links with empty `_escaped_fragment_` parameter so that
your server can recognize the crawler and serve it HTML snapshots. For more information about this
technique, see {@link http://code.google.com/web/ajaxcrawling/docs/specification.html Making AJAX
Applications Crawlable}.
### Relative links
Be sure to check all relative links, images, scripts etc. You must use an absolute path because the
path is going to be rewritten. You can use `<base href="" />` tag as well.
Running Angular apps with the History API enabled from document root is strongly encouraged as it
takes care of all relative link issues. **Otherwise you have to specify &lt;base href="" /&gt; !**
### Sending links among different browsers
Because of rewriting capability in Html5 mode, your users will be able to open regular url links in
legacy browsers and hashbang links in modern browser:
- Modern browser will rewrite hashbang URLs to regular URLs.
- Older browsers will redirect regular URLs to hashbang URLs.
### Example
Here you can see two `$location` instances, both in **Html5 mode**, but on different browsers, so
that you can see the differences. These `$location` services are connected to a fake browsers. Each
input represents address bar of the browser.
Note that when you type hashbang url into first browser (or vice versa) it doesn't rewrite /
redirect to regular / hashbang url, as this conversion happens only during parsing the initial URL
= on page reload.
In this examples we use `<base href="/base/index.html" />`
<ul class="doc-example">
<li ng:non-bindable class="html5-hashbang-example">
<div id="html5-mode" ng:controller="Html5Cntl">
<h3>Browser with History API</h3>
<ng:address-bar browser="html5"></ng:address-bar><br /><br />
$location.protocol() = {{$location.protocol()}}<br />
$location.host() = {{$location.host()}}<br />
$location.port() = {{$location.port()}}<br />
$location.path() = {{$location.path()}}<br />
$location.search() = {{$location.search()}}<br />
$location.hash() = {{$location.hash()}}<br />
<a href="/base/first?a=b">/base/first?a=b</a> | <a
href="sec/ond?flag#hash">sec/ond?flag#hash</a> | <a href="/base/another?search"
ng:ext-link>external</a>
</div>
<div id="hashbang-mode" ng:controller="HashbangCntl">
<h3>Browser without History API</h3>
<ng:address-bar browser="hashbang"></ng:address-bar><br /><br />
$location.protocol() = {{$location.protocol()}}<br />
$location.host() = {{$location.host()}}<br />
$location.port() = {{$location.port()}}<br />
$location.path() = {{$location.path()}}<br />
$location.search() = {{$location.search()}}<br />
$location.hash() = {{$location.hash()}}<br />
<a href="/base/first?a=b">/base/first?a=b</a> | <a
href="sec/ond?flag#hash">sec/ond?flag#hash</a> | <a href="/base/another?search"
ng:ext-link>external</a>
</div>
</li>
</ul>
<script type="text/javascript">
function FakeBrowser(initUrl, baseHref) {
this.onUrlChange = function(fn) {
this.urlChange = fn;
};
this.url = function() {
return initUrl;
};
this.defer = function(fn, delay) {
setTimeout(function() { fn(); }, delay || 0);
};
this.baseHref = function() {
return baseHref;
};
this.hover = angular.noop;
this.notifyWhenOutstandingRequests = angular.noop;
}
var browsers = {
html5: new FakeBrowser('http://www.host.com/base/path?a=b#h', '/base/index.html'),
hashbang: new FakeBrowser('http://www.host.com/base/index.html#!/path?a=b#h',
'/base/index.html')
};
function Html5Cntl($location) {
this.$location = $location;
}
function HashbangCntl($location) {
this.$location = $location;
}
angular.widget('ng:address-bar', function(tpl) {
return function(elm) {
var browser = browsers[elm.attr('browser')],
input = angular.element('<input type="text" />').val(browser.url()),
delay;
input.bind('keypress keyup keydown', function() {
if (!delay) {
delay = setTimeout(fireUrlChange, 250);
}
});
browser.url = function(url) {
return input.val(url);
};
elm.append('Address: ').append(input);
function fireUrlChange() {
delay = null;
browser.urlChange(input.val());
}
};
});
function initEnv(name) {
var root = angular.element(document.getElementById(name + '-mode'));
var scope = angular.scope(null, {
$config: {html5Mode: true, hashPrefix: '!'},
$browser: browsers[name],
$document: root,
$sniffer: {history: name == 'html5'}
});
angular.compile(root)(scope).$apply();
root.bind('click', function(e) {
e.stopPropagation();
});
}
initEnv('html5');
initEnv('hashbang');
</script>
# Caveats
## Page reload navigation
The `$location` service allows you to change only the URL; it does not allow you to reload the
page. When you need to change the URL and reload the page or navigate to a different page, please
use a lower level API, {@link api/angular.service.$window $window.location.href}.
## Using $location outside of the scope life-cycle
`$location` knows about Angular's {@link api/angular.scope scope} life-cycle. When a URL changes in
the browser it updates the `$location` and calls `$apply` so that all $watchers / $observers are
notified.
When you change the `$location` inside the `$digest` phase everything is ok; `$location` will
propagate this change into browser and will notify all the $watchers / $observers.
When you want to change the `$location` from outside Angular (for example, through a DOM Event or
during testing) - you must call `$apply` to propagate the changes.
## $location.path() and ! or / prefixes
A path should always begin with forward slash (`/`); the `$location.path()` setter will add the
forward slash if it is missing.
Note that the `!` prefix in the hashbang mode is not part of `$location.path()`; it is actually
hashPrefix.
# Testing with the $location service
When using `$location` service during testing, you are outside of the angular's {@link
api/angular.scope scope} life-cycle. This means it's your responsibility to call `scope.$apply()`.
<pre>
angular.service('$serviceUnderTest', function($location) {
// whatever it does...
};
describe('$serviceUnderTest', function() {
var scope, $location, $sut;
beforeEach(function() {
scope = angular.scope();
$location = scope.$service('$location');
$sut = scope.$service('$serviceUnderTest');
});
it('should...', function() {
$location.path('/new/path');
scope.$apply();
// test whatever the service should do...
});
});
</pre>
# Migrating from earlier AngularJS releases
In earlier releases of Angular, `$location` used `hashPath` or `hashSearch` to process path and
search methods. With this release, the `$location` service processes path and search methods and
then uses the information it obtains to compose hashbang URLs (such as
`http://server.com/#!/path?search=a`), when necessary.
## Changes to your code
<table>
<tr class="head">
<td>Navigation inside the app</td>
<td>Change to</td>
</tr>
<tr>
<td>$location.href = value<br />$location.hash = value<br />$location.update(value)<br
/>$location.updateHash(value)</td>
<td>$location.path(path).search(search)</td>
</tr>
<tr>
<td>$location.hashPath = path</td>
<td>$location.path(path)</td>
</tr>
<tr>
<td>$location.hashSearch = search</td>
<td>$location.search(search)</td>
</tr>
<tr class="head">
<td>Navigation outside the app</td>
<td>Use lower level API</td>
</tr>
<tr>
<td>$location.href = value<br />$location.update(value)</td>
<td>$window.location.href = value</td>
</tr>
<tr>
<td>$location[protocol | host | port | path | search]</td>
<td>$window.location[protocol | host | port | path | search]</td>
</tr>
<tr class="head">
<td>Read access</td>
<td>Change to</td>
</tr>
<tr>
<td>$location.hashPath</td>
<td>$location.path()</td>
</tr>
<tr>
<td>$location.hashSearch</td>
<td>$location.search()</td>
</tr>
<tr>
<td>$location.href<br />$location.protocol<br />$location.host<br />$location.port<br
/>$location.hash</td>
<td>$location.absUrl()<br />$location.protocol()<br />$location.host()<br />$location.port()<br
/>$location.path() + $location.search()</td>
</tr>
<tr>
<td>$location.path<br />$location.search</td>
<td>$window.location.path<br />$window.location.search</td>
</tr>
</table>
## Two-way binding to $location
The Angular's compiler currently does not support two-way binding for methods (see {@link
https://github.com/angular/angular.js/issues/404 issue}). If you should require two-way binding,
you will need to specify an extra property that has two watchers. For example:
<pre>
<!-- html -->
<input type="text" name="locationPath" />
</pre>
<pre>
// js - controller
this.$watch('locationPath', function(scope, path) {
$location.path(path);
});
this.$watch('$location.path()', function(scope, path) {
scope.locationPath = path;
});
</pre>
# Related API
* {@link api/angular.service.$location $location API}
@@ -45,7 +45,7 @@ angular.service('batchLog', function($defer, $log) {
* template via the batchLog service.
*/
angular.service('routeTemplateMonitor', function($route, batchLog) {
$route.onChange(function() {
this.$on('$afterRouteChange', function() {
batchLog($route.current ? $route.current.template : null);
});
}, {$inject: ['$route', 'batchLog'], $eager: true});
+1 -3
View File
@@ -30,9 +30,7 @@ of the following documents before returning here to the Developer Guide:
## {@link dev_guide.scopes Angular Scope Objects}
* {@link dev_guide.scopes.understanding_scopes Understanding Angular Scope Objects}
* {@link dev_guide.scopes.working_scopes Working With Angular Scopes}
* {@link dev_guide.scopes.controlling_scopes Applying Controllers to Scopes}
* {@link dev_guide.scopes.updating_scopes Updating Scope Properties}
* {@link dev_guide.scopes.internals Angular Scope Internals}
## {@link dev_guide.compiler Angular HTML Compiler}
+1
View File
@@ -93,6 +93,7 @@ pre-packaged bundle.
* install q: `npm install q`
* install qq: `npm install qq`
* install q-fs: `npm install q-fs`
* install jasmine-node: `npm install jasmine`
+1 -1
View File
@@ -146,7 +146,7 @@ __`app/partials/phone-list.html`:__
We also added a placeholder template for the phone details view:
__`app/partials/phone-list.html`:__
__`app/partials/phone-detail.html`:__
<pre>
TBD: detail view for {{params.phoneId}}
</pre>
Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

+4 -1
View File
@@ -252,11 +252,14 @@ describe('ngdoc', function(){
var methodB = new Doc({name: 'methodB', methodOf: 'angular.service.abc'});
var propA = new Doc({name: 'propA', propertyOf: 'angular.service.abc'});
var propB = new Doc({name: 'propB', propertyOf: 'angular.service.abc'});
var docs = [methodB, methodA, propB, propA, parent]; // keep wrong order;
var eventA = new Doc({name: 'eventA', eventOf: 'angular.service.abc'});
var eventB = new Doc({name: 'eventB', eventOf: 'angular.service.abc'});
var docs = [methodB, methodA, eventB, eventA, propA, propB, parent]; // keep wrong order;
ngdoc.merge(docs);
expect(docs.length).toEqual(1);
expect(docs[0].id).toEqual('angular.service.abc');
expect(docs[0].methods).toEqual([methodA, methodB]);
expect(docs[0].events).toEqual([eventA, eventB]);
expect(docs[0].properties).toEqual([propA, propB]);
});
+16
View File
@@ -15,4 +15,20 @@ describe('writer', function(){
expect(toString(['abc',{}])).toEqual('abc{}');
});
});
describe('replace method', function() {
var content,
replacements;
beforeEach(function() {
content = 'angular super jQuery manifest';
});
it('should replace placeholders', function() {
replacements = {'angular': 'ng', 'jQuery': 'jqlite','notHere': 'here'};
content = writer.replace(content, replacements);
expect(content).toBe('ng super jqlite manifest');
});
});
});
+25 -6
View File
@@ -30,7 +30,7 @@ writer.makeDir('build/docs/syntaxhighlighter').then(function() {
return Q.deep(fileFutures);
}).then(function generateManifestFile() {
return appCache('build/docs/').then(function(list) {
writer.output('appcache-offline.manifest',list)
writer.output('appcache-offline.manifest', list);
});
}).then(function printStats() {
console.log('DONE. Generated ' + docs.length + ' pages in ' + (now()-start) + 'ms.' );
@@ -42,11 +42,30 @@ function writeTheRest(writesFuture) {
writesFuture.push(writer.copyDir('img'));
writesFuture.push(writer.copyDir('examples'));
writesFuture.push(writer.copyTpl('index.html'));
writesFuture.push(writer.copy('docs/src/templates/index.html',
'build/docs/index-jq.html',
'<!-- jquery place holder -->',
'<script src=\"jquery.min.js\"><\/script>'));
var manifest = 'manifest="appcache.manifest"',
jq = '<script src="jquery.min.js"></script>',
ngMin = '<script src="../angular.min.js" ng:autobind></script>',
ng = '<script src="../angular.js" ng:autobind></script>';
writesFuture.push(writer.copy('docs/src/templates/index.html', 'build/docs/index.html',
writer.replace, {'doc:manifest': manifest,
'<!-- angular script place holder -->': ngMin}));
writesFuture.push(writer.copy('docs/src/templates/index.html', 'build/docs/index-jq.html',
writer.replace, {'doc:manifest': manifest,
'<!-- angular script place holder -->': ngMin,
'<!-- jquery place holder -->': jq}));
writesFuture.push(writer.copy('docs/src/templates/index.html', 'build/docs/index-debug.html',
writer.replace, {'doc:manifest': '',
'<!-- angular script place holder -->': ng}));
writesFuture.push(writer.copy('docs/src/templates/index.html', 'build/docs/index-jq-debug.html',
writer.replace, {'doc:manifest': '',
'<!-- angular script place holder -->': ng,
'<!-- jquery place holder -->': jq}));
writesFuture.push(writer.copyTpl('offline.html'));
writesFuture.push(writer.copyTpl('docs-scenario.html'));
writesFuture.push(writer.copyTpl('jquery.min.js'));
+23 -3
View File
@@ -29,6 +29,7 @@ function Doc(text, file, line) {
this.param = this.param || [];
this.properties = this.properties || [];
this.methods = this.methods || [];
this.events = this.events || [];
this.links = this.links || [];
}
Doc.METADATA_IGNORE = (function(){
@@ -217,6 +218,10 @@ Doc.prototype = {
description: self.markdown(text.replace(match[0], match[4]))
};
self.properties.push(property);
} else if(atName == 'eventType') {
var match = text.match(/^([^\s]*)\s+on\s+([\S\s]*)/);
self.type = match[1];
self.target = match[2];
} else {
self[atName] = text;
}
@@ -525,6 +530,21 @@ Doc.prototype = {
dom.h('Example', property.example, dom.html);
});
});
dom.h('Events', this.events, function(event){
dom.h(event.shortName, event, function(){
dom.html(event.description);
dom.tag('div', {class:'inline'}, function(){
dom.h('Type:', event.type);
});
dom.tag('div', {class:'inline'}, function(){
dom.h('Target:', event.target);
});
event.html_usage_parameters(dom);
self.html_usage_this(dom);
dom.h('Example', event.example, dom.html);
});
});
},
parameters: function(dom, separator, skipFirst, prefix) {
@@ -549,14 +569,14 @@ Doc.prototype = {
function scenarios(docs){
var specs = [];
specs.push('describe("angular without jquery", function() {');
specs.push('describe("angular+jqlite", function() {');
appendSpecs('index.html');
specs.push('});');
specs.push('');
specs.push('');
specs.push('describe("angular with jquery", function() {');
specs.push('describe("angular+jquery", function() {');
appendSpecs('index-jq.html');
specs.push('});');
@@ -717,7 +737,7 @@ function merge(docs){
});
// merge into parents
if (findParent(doc, 'method') || findParent(doc, 'property')) {
if (findParent(doc, 'method') || findParent(doc, 'property') || findParent(doc, 'event')) {
docs.splice(i, 1);
} else {
i++;
+6 -3
View File
@@ -56,8 +56,13 @@
element.append(tabs);
var script = (exampleSrc.match(/<script[^\>]*>([\s\S]*)<\/script>/) || [])[1] || '';
try {
window.eval(script);
if (window.execScript) { // IE
window.execScript(script || '"stupid IE!"'); // IE complains when evaling empty string
} else {
window.eval(script);
}
} catch (e) {
alert(e);
}
@@ -181,7 +186,6 @@
'</div>';
angular.widget('doc:tutorial-instructions', function(element) {
element.hide();
this.descend(true);
var tabs = angular.element(HTML_TPL.replace('{show}', element.attr('show') || 'false')),
@@ -207,7 +211,6 @@
element.html('');
element.append(tabs);
element.show();
});
+65
View File
@@ -394,3 +394,68 @@ li {
margin: 0em 2em 1em 0em;
float:right;
}
.table {
border-collapse: collapse;
}
.table th:first-child {
text-align: right;
}
.table th,
.table td {
border: 1px solid black;
padding: .5em 1em;
}
.table th {
white-space: nowrap;
}
.table th.section {
text-align: left;
background-color: lightgray;
}
[ng\:cloak], .ng-cloak {
display: none;
}
.inline * {
display: inline;
}
table {
border-collapse: collapse;
}
td {
padding: 4px;
border: 1px solid lightgray;
}
td.head, thead td, .head td {
background-color: #EEE;
}
td.empty-corner-lt {
border-left: 0;
border-top: 0;
background-color: transparent;
}
/* service.$location Html5 mode example */
.html5-hashbang-example {
height: 255px;
margin-left: -40px;
padding-left: 30px;
}
.html5-hashbang-example div {
float: left;
width: 375px;
}
.html5-hashbang-example div input {
width: 360px;
}
+18 -10
View File
@@ -4,7 +4,7 @@ function DocsController($location, $browser, $window, $cookies) {
var self = this,
OFFLINE_COOKIE_NAME = 'ng-offline',
HAS_HASH = /#/;
DOCS_PATH = /^\/(api)|(guide)|(cookbook)|(misc)|(tutorial)/;
this.$location = $location;
@@ -13,13 +13,14 @@ function DocsController($location, $browser, $window, $cookies) {
self.subpage = false;
self.offlineEnabled = ($cookies[OFFLINE_COOKIE_NAME] == angular.version.full);
if (!HAS_HASH.test($location.href)) {
$location.hashPath = '!/api';
if (!$location.path()) {
$location.path('/api').replace();
}
this.$watch('$location.hashPath', function(hashPath) {
if (hashPath.match(/^!/)) {
var parts = hashPath.substring(1).split('/');
this.$watch('$location.path()', function(scope, path) {
// ignore non-doc links which are used in examples
if (DOCS_PATH.test(path)) {
var parts = path.split('/');
self.sectionId = parts[1];
self.partialId = parts[2] || 'index';
self.pages = angular.Array.filter(NG_PAGES, {section:self.sectionId});
@@ -27,7 +28,7 @@ function DocsController($location, $browser, $window, $cookies) {
var i = self.pages.length;
while (i--) {
if (self.pages[i].id == self.partialId) {
self.partialTitle = self.pages[i].name
self.partialTitle = self.pages[i].name;
break;
}
}
@@ -67,13 +68,13 @@ function DocsController($location, $browser, $window, $cookies) {
this.afterPartialLoaded = function() {
SyntaxHighlighter.highlight();
$window.scrollTo(0,0);
$window._gaq.push(['_trackPageview', $location.hashPath.substr(1)]);
$window._gaq.push(['_trackPageview', $location.path()]);
};
this.getFeedbackUrl = function() {
return "mailto:angular@googlegroups.com?" +
"subject=" + escape("Feedback on " + $location.href) + "&" +
"body=" + escape("Hi there,\n\nI read " + $location.href + " and wanted to ask ....");
"subject=" + escape("Feedback on " + $location.absUrl()) + "&" +
"body=" + escape("Hi there,\n\nI read " + $location.absUrl() + " and wanted to ask ....");
};
/** stores a cookie that is used by apache to decide which manifest ot send */
@@ -123,3 +124,10 @@ function TutorialInstructionsCtrl($cookieStore) {
$cookieStore.put('selEnv', id);
};
}
angular.service('$locationConfig', function() {
return {
html5Mode: false,
hashPrefix: '!'
};
});
+4 -4
View File
@@ -2,7 +2,7 @@
<html xmlns:ng="http://angularjs.org/"
xmlns:doc="http://docs.angularjs.org/"
ng:controller="DocsController"
manifest="appcache.manifest">
doc:manifest>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title ng:bind-template="AngularJS: {{partialTitle}}">AngularJS</title>
@@ -56,7 +56,7 @@
<input type="text" name="search" id="search-box" placeholder="search the docs"
tabindex="1" accesskey="s">
<ul id="content-list" ng:class="sectionId">
<ul id="content-list" ng:class="sectionId" ng:cloak>
<li ng:repeat="page in pages.$filter(search)" ng:class="getClass(page)">
<a href="{{getUrl(page)}}" ng:class="selectedPartial(page)"
ng:bind="page.shortName"
@@ -72,7 +72,7 @@
<ng:include id="content" src="getCurrentPartial()" onload="afterPartialLoaded()"></ng:include>
</div>
<div id="footer">
<div id="footer" ng:cloak>
<a id="version"
ng:href="https://github.com/angular/angular.js/blob/master/CHANGELOG.md#{{versionNumber}}"
ng:bind-template="v{{version}}">
@@ -103,7 +103,7 @@
<script src="syntaxhighlighter/syntaxhighlighter-combined.js"></script>
<!-- jquery place holder -->
<script src="../angular.min.js" ng:autobind></script>
<!-- angular script place holder -->
<script src="docs-combined.js"></script>
<script src="docs-keywords.js"></script>
</body>
+26 -7
View File
@@ -8,14 +8,14 @@ var Q = require('qq');
var OUTPUT_DIR = "build/docs/";
var fs = require('fs');
exports.output = function(file, content){
exports.output = function(file, content) {
console.log('writing ', file);
var fullPath = OUTPUT_DIR + file;
var dir = parent(fullPath);
return Q.when(exports.makeDir(dir), function(error) {
qfs.write(fullPath,exports.toString(content));
});
}
};
//recursively create directory
exports.makeDir = function (path) {
@@ -44,16 +44,35 @@ exports.copyTpl = function(filename) {
return exports.copy('docs/src/templates/' + filename, OUTPUT_DIR + filename);
};
exports.copy = function (from, to, replacementKey, replacement) {
// Have to use rb (read binary), char 'r' is infered by library.
return qfs.read(from,'b').then(function(content) {
if(replacementKey && replacement) {
content = content.toString().replace(replacementKey, replacement);
/* Copy files from one place to another.
* @param from{string} path of the source file to be copied
* @param to{string} path of where the copied file should be stored
* @param transform{function=} transfromation function to be applied before return
*/
exports.copy = function(from, to, transform) {
var args = Array.prototype.slice.call(arguments, 3);
// We have to use binary reading, Since some characters are unicode.
return qfs.read(from, 'b').then(function(content) {
if (transform) {
args.unshift(content.toString());
content = transform.apply(null, args);
}
qfs.write(to, content);
});
}
/* Replace placeholders in content accordingly
* @param content{string} content to be modified
* @param replacements{obj} key and value pairs in which key will be replaced with value in content
*/
exports.replace = function(content, replacements) {
for(key in replacements) {
content = content.replace(key, replacements[key]);
}
return content;
}
exports.copyDir = function copyDir(dir) {
return qfs.listDirectoryTree('docs/' + dir).then(function(dirs) {
var done;
+31 -10
View File
@@ -54,7 +54,7 @@ function fetch(collection, url){
if (title.match(/\.ngdoc$/)) {
var exportUrl = entry.match(/<content type='text\/html' src='(.*?)'\/>/)[1];
download(collection, title, exportUrl);
}
};
});
}
);
@@ -136,7 +136,13 @@ function login(username, password){
}
function getAuthToken(){
return fs.readFileSync('tmp/gdocs.auth');
var pwdFile = 'tmp/gdocs.auth';
try {
fs.statSync(pwdFile);
return fs.readFileSync(pwdFile);
} catch (e) {
console.log('Please log in first...');
}
}
function request(method, url, options, response) {
@@ -147,14 +153,29 @@ function request(method, url, options, response) {
path: url[3],
method: method
}, function(res){
var data = [];
res.setEncoding('utf8');
res.on('end', function(){
response(data.join(''));
});
res.on('data', function (chunk) {
data.push(chunk);
});
switch (res.statusCode) {
case 200: {
var data = [];
res.setEncoding('utf8');
res.on('end', function(){
response(data.join(''));
});
res.on('data', function (chunk) {
data.push(chunk);
});
res.on('error', function(e){
console.log(e);
});
break;
}
case 401: {
console.log('Eror: Login credentials expired! Please login.');
break;
}
default: {
console.log(res);
}
}
});
for(var header in options.headers) {
request.setHeader(header, options.headers[header]);
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
if [ ! -e gen_docs.disable ]; then
/usr/bin/env node docs/spec/specs.js --noColor | grep -v '/lib/jasmine' && node docs/src/gen-docs.js
/usr/bin/env jasmine-node docs/spec -i docs/src -i lib --noColor && node docs/src/gen-docs.js
fi
+12
View File
@@ -0,0 +1,12 @@
# i18n directory overview:
- closure/ - closure files we use for ruleset generation
- locale/ - angular's locale ruleset files
- src/ - source files
- spec/ - spec files for stuff in src directory
- generate.sh - runs src scripts on closure dir and stores output in locale dir
- update-closure.sh - downloads the latest version of closure files from public svn repo
The closure files (maintained by Shanjian Li (shanjian)) change very rarely, so we don't need to
regenerate locale files very often.
+385
View File
@@ -0,0 +1,385 @@
// Copyright 2009 The Closure Library Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/**
* @fileoverview A utility to get better currency format pattern.
*
* This module implement a new currency format representation model. It
* provides 3 currency representation forms: global, portable and local. Local
* format is the most popular format people use to represent currency in its
* circulating country without worrying about how it should be distinguished
* from other currencies. Global format is a formal representation in context
* of multiple currencies in same page, it is ISO 4217 currency code. Portable
* format is a compromise between global and local. It looks similar to how
* people would like to see how their currencies is being represented in other
* media. While at the same time, it should be distinguishable to world's
* popular currencies (like USD, EUR) and currencies somewhat relevant in the
* area (like CNY in HK, though native currency is HKD). There is no guarantee
* of uniqueness.
*
*/
goog.provide('goog.i18n.currency');
/**
* The mask of precision field.
* @private
*/
goog.i18n.currency.PRECISION_MASK_ = 0x07;
/**
* If this flag is set, it means the currency sign should position before
* number.
* @private
*/
goog.i18n.currency.POSITION_FLAG_ = 0x08;
/**
* Should a space to inserted between number and currency sign.
* @private
*/
goog.i18n.currency.SPACE_FLAG_ = 0x20;
/**
* This function will add tier2 currency support. Be default, only tier1
* (most popular currencies) are supportted. If an application really need
* to support some of the rarely used currency, it should call this function
* before any other functions in this namespace.
*/
goog.i18n.currency.addTier2Support = function() {
for (var key in goog.i18n.currency.CurrencyInfoTier2) {
goog.i18n.currency.CurrencyInfo[key] =
goog.i18n.currency.CurrencyInfoTier2[key];
}
};
/**
* Global currency pattern always uses ISO-4217 currency code as prefix. Local
* currency sign is added if it is different from currency code. Each currency
* is unique in this form. The negative side is that ISO code looks weird in
* some countries as poeple normally do not use it. Local currency sign
* alleviate the problem, but also make it a little verbose.
*
* @param {string} currencyCode ISO-4217 3-letter currency code.
* @return {string} Global currency pattern string for given currency.
*/
goog.i18n.currency.getGlobalCurrencyPattern = function(currencyCode) {
var info = goog.i18n.currency.CurrencyInfo[currencyCode];
var patternNum = info[0];
if (currencyCode == info[1]) {
if ((patternNum & goog.i18n.currency.POSITION_FLAG_) == 0) {
patternNum |= goog.i18n.currency.SPACE_FLAG_;
}
return goog.i18n.currency.getCurrencyPattern_(patternNum, info[1]);
}
return currencyCode + ' ' +
goog.i18n.currency.getCurrencyPattern_(patternNum, info[1]);
};
/**
* Return global currency sign string for those applications
* that want to handle currency sign themselves.
*
* @param {string} currencyCode ISO-4217 3-letter currency code.
* @return {string} Global currency sign for given currency.
*/
goog.i18n.currency.getGlobalCurrencySign = function(currencyCode) {
var info = goog.i18n.currency.CurrencyInfo[currencyCode];
if (currencyCode == info[1]) {
return currencyCode;
}
return currencyCode + ' ' + info[1];
};
/**
* Local currency pattern is the most frequently used pattern in currency's
* native region. It does not care about how it is distinguished from other
* currencies.
*
* @param {string} currencyCode ISO-4217 3-letter currency code.
* @return {string} Local currency pattern string for given currency.
*/
goog.i18n.currency.getLocalCurrencyPattern = function(currencyCode) {
var info = goog.i18n.currency.CurrencyInfo[currencyCode];
return goog.i18n.currency.getCurrencyPattern_(info[0], info[1]);
};
/**
* Returns local currency sign string for those applications that need to
* handle currency sign separately.
* @param {string} currencyCode ISO-4217 3-letter currency code.
* @return {string} Local currency sign for given currency.
*/
goog.i18n.currency.getLocalCurrencySign = function(currencyCode) {
return goog.i18n.currency.CurrencyInfo[currencyCode][1];
};
/**
* Portable currency pattern is a compromise between local and global. It is
* not a mere blend or mid-way between the two. Currency sign is chosen so that
* it looks familiar to native users. It also has enough information to
* distinguish itself from other popular currencies in its native region.
* In this pattern, currency sign symbols that has availability problem in
* popular fonts are also avoided.
*
* @param {string} currencyCode ISO-4217 3-letter currency code.
* @return {string} Portable currency pattern string for given currency.
*/
goog.i18n.currency.getPortableCurrencyPattern = function(currencyCode) {
var info = goog.i18n.currency.CurrencyInfo[currencyCode];
return goog.i18n.currency.getCurrencyPattern_(info[0], info[2]);
};
/**
* Return portable currency sign string for those applications that need to
* handle currency sign themselves.
* @param {string} currencyCode ISO-4217 3-letter currency code.
* @return {string} Portable currency sign for given currency.
*/
goog.i18n.currency.getPortableCurrencySign = function(currencyCode) {
return goog.i18n.currency.CurrencyInfo[currencyCode][2];
};
/**
* This function returns the default currency sign position. Some application
* may want to handle currency sign and currency amount separately. This
* function can be used in such situation to position the currency sign
* relative to amount field correctly.
* @param {string} currencyCode ISO-4217 3-letter currency code.
* @return {boolean} true if currency should be positioned before amount field.
*/
goog.i18n.currency.isPrefixSignPosition = function(currencyCode) {
return (goog.i18n.currency.CurrencyInfo[currencyCode][0] &
goog.i18n.currency.POSITION_FLAG_) == 0;
};
/**
* This function construct the currency pattern. Currency sign is provided. The
* pattern information is encoded in patternNum.
*
* @param {number} patternNum Encoded pattern number that has
* currency pattern information.
* @param {string} sign the currency sign that will be used in pattern.
*
* @return {string} currency pattern string.
* @private
*/
goog.i18n.currency.getCurrencyPattern_ = function(patternNum, sign) {
var strParts = ['#,##0'];
var precision = patternNum & goog.i18n.currency.PRECISION_MASK_;
if (precision > 0) {
strParts.push('.');
for (var i = 0; i < precision; i++) {
strParts.push('0');
}
}
if ((patternNum & goog.i18n.currency.POSITION_FLAG_) == 0) {
strParts.unshift((patternNum & goog.i18n.currency.SPACE_FLAG_) ?
"' " : "'");
strParts.unshift(sign);
strParts.unshift("'");
} else {
strParts.push((patternNum & goog.i18n.currency.SPACE_FLAG_) ? " '" : "'",
sign, "'");
}
return strParts.join('');
};
/**
* Tier 1 currency information.
* @type {!Object.<!Array>}
*/
goog.i18n.currency.CurrencyInfo = {
'AED': [2, '\u062F\u002e\u0625', 'DH'],
'ARS': [2, '$', 'AR$'],
'AUD': [2, '$', 'AU$'],
'BDT': [2, '\u09F3', 'Tk'],
'BRL': [2, 'R$', 'R$'],
'CAD': [2, '$', 'C$'],
'CHF': [2, 'Fr.', 'CHF'],
'CLP': [0, '$', 'CL$'],
'CNY': [2, '¥', 'RMB¥'],
'COP': [2, '$', 'COL$'],
'CRC': [2, '\u20a1', 'CR₡'],
'CUP': [2, '$', '$MN'],
'CZK': [10, 'Kč', 'Kč'],
'DKK': [26, 'kr', 'kr'],
'DOP': [2, '$', 'RD$'],
'EGP': [2, '£', 'LE'],
'EUR': [26, '€', '€'],
'GBP': [2, '£', 'GB£'],
'HKD': [2, '$', 'HK$'],
'ILS': [10, '\u20AA', 'IL₪'],
'INR': [2, 'Rs', 'Rs'],
'ISK': [10, 'kr', 'kr'],
'JMD': [2, '$', 'JA$'],
'JPY': [0, '¥', 'JP¥'],
'KRW': [0, '\u20A9', 'KR₩'],
'LKR': [2, 'Rs', 'SLRs'],
'MNT': [2, '\u20AE', 'MN₮'],
'MXN': [2, '$', 'Mex$'],
'MYR': [2, 'RM', 'RM'],
'NOK': [26, 'kr', 'NOkr'],
'PAB': [2, 'B/.', 'B/.'],
'PEN': [2, 'S/.', 'S/.'],
'PHP': [2, 'P', 'PHP'],
'PKR': [2, 'Rs.', 'PKRs.'],
'RUB': [10, 'руб', 'руб'],
'SAR': [2, '\u0633\u002E\u0631', 'SR'],
'SEK': [10, 'kr', 'kr'],
'SGD': [2, '$', 'S$'],
'THB': [2, '\u0e3f', 'THB'],
'TRY': [2, 'YTL', 'YTL'],
'TWD': [2, 'NT$', 'NT$'],
'USD': [2, '$', 'US$'],
'UYU': [2, '$', 'UY$'],
'VND': [10, '\u20AB', 'VN₫'],
'YER': [2, 'YER', 'YER'],
'ZAR': [2, 'R', 'ZAR']
};
/**
* Tier 2 currency information.
* @type {!Object.<!Array>}
*/
goog.i18n.currency.CurrencyInfoTier2 = {
'AFN': [18, '\u060b', 'AFN'],
'ALL': [2, 'Lek', 'Lek'],
'AMD': [10, '\u0564\u0580\u002e', 'dram'],
'ANG': [2, '\u0083', 'NAƒ'],
'AOA': [2, 'Kz', 'Kz'],
'AWG': [2, 'ƒ', 'Afl.'],
'AZN': [2, 'm', 'man'],
'BAM': [18, 'КМ', 'KM'],
'BBD': [2, '$', 'Bds$'],
'BGN': [10, '\u043b\u0432', 'лв'],
'BHD': [3, '\u0628\u002e\u062f\u002e', 'BD'],
'BIF': [0, 'FBu', 'FBu'],
'BMD': [2, '$', 'BD$'],
'BND': [2, '$', 'B$'],
'BOB': [2, 'B$', 'B$'],
'BSD': [2, '$', 'B$'],
'BTN': [2, 'Nu.', 'Nu.'],
'BWP': [2, 'P', 'pula'],
'BYR': [0, 'Br', 'Br'],
'BZD': [2, '$', 'BZ$'],
'CDF': [2, 'F', 'CDF'],
'CVE': [2, '$', 'Esc'],
'DJF': [0, 'Fdj', 'Fdj'],
'DZD': [2, '\u062f\u062C', 'DA'],
'EEK': [10, 'EEK', 'EEK'],
'ERN': [2, 'Nfk', 'Nfk'],
'ETB': [2, 'Br', 'Br'],
'FJD': [2, '$', 'FJ$'],
'FKP': [2, '£', 'FK£'],
'GEL': [2, 'GEL', 'GEL'],
'GHS': [2, '\u20B5', 'GHS¢'],
'GIP': [2, '£', 'GI£'],
'GMD': [2, 'D', 'GMD'],
'GNF': [0, 'FG', 'FG'],
'GTQ': [2, 'Q', 'GTQ'],
'GYD': [2, '$', 'GY$'],
'HNL': [2, 'L', 'HNL'],
'HRK': [2, 'kn', 'kn'],
'HTG': [2, 'G', 'HTG'],
'HUF': [10, 'Ft', 'Ft'],
'IDR': [2, 'Rp', 'Rp'],
'IQD': [3, '\u0639\u062F', 'IQD'],
'IRR': [2, '\ufdfc', 'IRR'],
'JOD': [3, 'JOD', 'JOD'],
'KES': [2, 'KSh', 'KSh'],
'KGS': [2, 'som', 'som'],
'KHR': [10, '\u17DB', 'KHR'],
'KMF': [0, 'KMF', 'KMF'],
'KPW': [2, '\u20A9', 'KPW'],
'KWD': [3, '\u062F\u002e\u0643', 'KWD'],
'KYD': [2, '$', 'CI$'],
'KZT': [10, 'KZT', 'KZT'],
'LAK': [2, '\u20AD', 'LA₭'],
'LBP': [2, '\u0644\u002e\u0644', 'LBP'],
'LRD': [2, '$', 'L$'],
'LSL': [2, 'L', 'LSL'],
'LTL': [10, 'Lt', 'Lt'],
'LVL': [10, 'Ls', 'Ls'],
'LYD': [3, '\u0644\u002e\u062F', 'LD'],
'MAD': [2, '\u0645\u002E\u062F\u002E', 'MAD'],
'MDL': [2, 'MDL', 'MDL'],
'MGA': [1, 'MGA', 'MGA'],
'MKD': [2, 'MKD', 'MKD'],
'MMK': [2, 'K', 'MMK'],
'MOP': [2, 'MOP$', 'MOP$'],
'MRO': [1, 'UM', 'UM'],
'MUR': [2, 'Rs', 'MURs'],
'MVR': [2, 'Rf', 'MRF'],
'MWK': [2, 'MK', 'MK'],
'MZN': [2, 'MTn', 'MTn'],
'NAD': [2, '$', 'N$'],
'NGN': [2, '\u20A6', 'NG₦'],
'NIO': [2, 'C$', 'C$'],
'NPR': [2, 'Rs', 'NPRs'],
'NZD': [2, '$', 'NZ$'],
'OMR': [3, '\u0639\u002E\u062F\u002E', 'OMR'],
'PGK': [2, 'K', 'PGK'],
'PLN': [10, 'zł', 'zł'],
'PYG': [0, '\u20b2', 'PYG'],
'QAR': [2, '\u0642\u002E\u0631', 'QR'],
'RON': [2, 'L', 'RON'],
'RSD': [2, 'РС\u0414', 'RSD'],
'RWF': [0, 'RF', 'RF'],
'SBD': [2, '$', 'SI$'],
'SCR': [2, 'SR', 'SCR'],
'SDG': [2, 'SDG', 'SDG'],
'SHP': [2, '£', 'SH£'],
'SKK': [10, 'Sk', 'Sk'],
'SLL': [2, 'Le', 'Le'],
'SOS': [2, 'So. Sh.', 'So. Sh.'],
'SRD': [2, '$', 'SR$'],
'STD': [2, 'Db', 'Db'],
'SYP': [18, 'SYP', 'SYP'],
'SZL': [2, 'L', 'SZL'],
'TJS': [2, 'TJS', 'TJS'],
'TMM': [2, 'm', 'TMM'],
'TND': [3, '\u062F\u002e\u062A ', 'DT'],
'TOP': [2, 'T$', 'T$'],
'TTD': [2, '$', 'TT$'],
'TZS': [10, 'TZS', 'TZS'],
'UAH': [10, '\u20B4', 'грн'],
'UGX': [2, 'USh', 'USh'],
'UZS': [2, 'UZS', 'UZS'],
'VEF': [2, 'Bs.F', 'Bs.F'],
'VUV': [0, 'Vt', 'Vt'],
'WST': [2, 'WS$', 'WS$'],
'XAF': [0, 'FCFA', 'FCFA'],
'XCD': [2, '$', 'EC$'],
'XOF': [0, 'CFA', 'CFA'],
'XPF': [0, 'F', 'XPF'],
'ZMK': [2, 'ZK', 'ZK'],
'ZWL': [2, '$', 'ZW$']
};
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+738
View File
@@ -0,0 +1,738 @@
// Copyright 2011 The Closure Library Authors. All Rights Reserved
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/**
* @fileoverview Plural rules.
*
* This file is autogenerated by script:
* http://go/generate_pluralrules.py
* using the --for_closure flag.
*
* To reduce the file size (which may cause issues in some JS
* developing environments), this file will only contain locales
* that are usually supported by google products. This is defined as
* closure_tier1_locales and will change (most likely addition)
* over time. Rest of the data can be found in another file named
* "pluralrulesext.js", which will be generated at the
* same time together with this file.
*
* Before checkin, this file could have been manually edited. This is
* to incorporate changes before we could fix CLDR. All manual
* modification must be documented in this section, and should be
* removed after those changes land to CLDR.
*/
goog.provide('goog.i18n.pluralRules');
/**
* Plural pattern keyword
* @enum {string}
*/
goog.i18n.pluralRules.Keyword = {
ZERO: 'zero',
ONE: 'one',
TWO: 'two',
FEW: 'few',
MANY: 'many',
OTHER: 'other'
};
/**
* Default plural select rule.
* @param {number} n The count of items.
* @return {goog.i18n.pluralRules.Keyword} Default plural value.
* @private
*/
goog.i18n.pluralRules.defaultSelect_ = function(n) {
return goog.i18n.pluralRules.Keyword.OTHER;
};
/**
* Plural select rules for ar locale
*
* @param {number} n The count of items.
* @return {goog.i18n.pluralRules.Keyword} Locale specific plural value.
* @private
*/
goog.i18n.pluralRules.arSelect_ = function(n) {
if (n == 0) {
return goog.i18n.pluralRules.Keyword.ZERO;
}
if (n == 1) {
return goog.i18n.pluralRules.Keyword.ONE;
}
if (n == 2) {
return goog.i18n.pluralRules.Keyword.TWO;
}
if ((n % 100) >= 3 && (n % 100) <= 10 && n == Math.floor(n)) {
return goog.i18n.pluralRules.Keyword.FEW;
}
if ((n % 100) >= 11 && (n % 100) <= 99 && n == Math.floor(n)) {
return goog.i18n.pluralRules.Keyword.MANY;
}
return goog.i18n.pluralRules.Keyword.OTHER;
};
/**
* Plural select rules for en locale
*
* @param {number} n The count of items.
* @return {goog.i18n.pluralRules.Keyword} Locale specific plural value.
* @private
*/
goog.i18n.pluralRules.enSelect_ = function(n) {
if (n == 1) {
return goog.i18n.pluralRules.Keyword.ONE;
}
return goog.i18n.pluralRules.Keyword.OTHER;
};
/**
* Plural select rules for fil locale
*
* @param {number} n The count of items.
* @return {goog.i18n.pluralRules.Keyword} Locale specific plural value.
* @private
*/
goog.i18n.pluralRules.filSelect_ = function(n) {
if (n == 0 || n == 1) {
return goog.i18n.pluralRules.Keyword.ONE;
}
return goog.i18n.pluralRules.Keyword.OTHER;
};
/**
* Plural select rules for fr locale
*
* @param {number} n The count of items.
* @return {goog.i18n.pluralRules.Keyword} Locale specific plural value.
* @private
*/
goog.i18n.pluralRules.frSelect_ = function(n) {
if (n >= 0 && n < 2) {
return goog.i18n.pluralRules.Keyword.ONE;
}
return goog.i18n.pluralRules.Keyword.OTHER;
};
/**
* Plural select rules for lv locale
*
* @param {number} n The count of items.
* @return {goog.i18n.pluralRules.Keyword} Locale specific plural value.
* @private
*/
goog.i18n.pluralRules.lvSelect_ = function(n) {
if (n == 0) {
return goog.i18n.pluralRules.Keyword.ZERO;
}
if ((n % 10) == 1 && (n % 100) != 11) {
return goog.i18n.pluralRules.Keyword.ONE;
}
return goog.i18n.pluralRules.Keyword.OTHER;
};
/**
* Plural select rules for ga locale
*
* @param {number} n The count of items.
* @return {goog.i18n.pluralRules.Keyword} Locale specific plural value.
* @private
*/
goog.i18n.pluralRules.gaSelect_ = function(n) {
if (n == 1) {
return goog.i18n.pluralRules.Keyword.ONE;
}
if (n == 2) {
return goog.i18n.pluralRules.Keyword.TWO;
}
return goog.i18n.pluralRules.Keyword.OTHER;
};
/**
* Plural select rules for ro locale
*
* @param {number} n The count of items.
* @return {goog.i18n.pluralRules.Keyword} Locale specific plural value.
* @private
*/
goog.i18n.pluralRules.roSelect_ = function(n) {
if (n == 1) {
return goog.i18n.pluralRules.Keyword.ONE;
}
if (n == 0 || n != 1 && (n % 100) >= 1 &&
(n % 100) <= 19 && n == Math.floor(n)) {
return goog.i18n.pluralRules.Keyword.FEW;
}
return goog.i18n.pluralRules.Keyword.OTHER;
};
/**
* Plural select rules for lt locale
*
* @param {number} n The count of items.
* @return {goog.i18n.pluralRules.Keyword} Locale specific plural value.
* @private
*/
goog.i18n.pluralRules.ltSelect_ = function(n) {
if ((n % 10) == 1 && ((n % 100) < 11 || (n % 100) > 19)) {
return goog.i18n.pluralRules.Keyword.ONE;
}
if ((n % 10) >= 2 && (n % 10) <= 9 &&
((n % 100) < 11 || (n % 100) > 19) && n == Math.floor(n)) {
return goog.i18n.pluralRules.Keyword.FEW;
}
return goog.i18n.pluralRules.Keyword.OTHER;
};
/**
* Plural select rules for hr locale
*
* @param {number} n The count of items.
* @return {goog.i18n.pluralRules.Keyword} Locale specific plural value.
* @private
*/
goog.i18n.pluralRules.hrSelect_ = function(n) {
if ((n % 10) == 1 && (n % 100) != 11) {
return goog.i18n.pluralRules.Keyword.ONE;
}
if ((n % 10) >= 2 && (n % 10) <= 4 &&
((n % 100) < 12 || (n % 100) > 14) && n == Math.floor(n)) {
return goog.i18n.pluralRules.Keyword.FEW;
}
if ((n % 10) == 0 || ((n % 10) >= 5 && (n % 10) <= 9) ||
((n % 100) >= 11 && (n % 100) <= 14) && n == Math.floor(n)) {
return goog.i18n.pluralRules.Keyword.MANY;
}
return goog.i18n.pluralRules.Keyword.OTHER;
};
/**
* Plural select rules for cs locale
*
* @param {number} n The count of items.
* @return {goog.i18n.pluralRules.Keyword} Locale specific plural value.
* @private
*/
goog.i18n.pluralRules.csSelect_ = function(n) {
if (n == 1) {
return goog.i18n.pluralRules.Keyword.ONE;
}
if (n == 2 || n == 3 || n == 4) {
return goog.i18n.pluralRules.Keyword.FEW;
}
return goog.i18n.pluralRules.Keyword.OTHER;
};
/**
* Plural select rules for pl locale
*
* @param {number} n The count of items.
* @return {goog.i18n.pluralRules.Keyword} Locale specific plural value.
* @private
*/
goog.i18n.pluralRules.plSelect_ = function(n) {
if (n == 1) {
return goog.i18n.pluralRules.Keyword.ONE;
}
if ((n % 10) >= 2 && (n % 10) <= 4 &&
((n % 100) < 12 || (n % 100) > 14) && n == Math.floor(n)) {
return goog.i18n.pluralRules.Keyword.FEW;
}
if ((n % 10) == 0 || n != 1 && (n % 10) == 1 ||
((n % 10) >= 5 && (n % 10) <= 9 || (n % 100) >= 12 && (n % 100) <= 14) &&
n == Math.floor(n)) {
return goog.i18n.pluralRules.Keyword.MANY;
}
return goog.i18n.pluralRules.Keyword.OTHER;
};
/**
* Plural select rules for sl locale
*
* @param {number} n The count of items.
* @return {goog.i18n.pluralRules.Keyword} Locale specific plural value.
* @private
*/
goog.i18n.pluralRules.slSelect_ = function(n) {
if ((n % 100) == 1) {
return goog.i18n.pluralRules.Keyword.ONE;
}
if ((n % 100) == 2) {
return goog.i18n.pluralRules.Keyword.TWO;
}
if ((n % 100) == 3 || (n % 100) == 4) {
return goog.i18n.pluralRules.Keyword.FEW;
}
return goog.i18n.pluralRules.Keyword.OTHER;
};
/**
* Plural select rules for mt locale
*
* @param {number} n The count of items.
* @return {goog.i18n.pluralRules.Keyword} Locale specific plural value.
* @private
*/
goog.i18n.pluralRules.mtSelect_ = function(n) {
if (n == 1) {
return goog.i18n.pluralRules.Keyword.ONE;
}
if (n == 0 || ((n % 100) >= 2 && (n % 100) <= 4 && n == Math.floor(n))) {
return goog.i18n.pluralRules.Keyword.FEW;
}
if ((n % 100) >= 11 && (n % 100) <= 19 && n == Math.floor(n)) {
return goog.i18n.pluralRules.Keyword.MANY;
}
return goog.i18n.pluralRules.Keyword.OTHER;
};
/**
* Plural select rules for mk locale
*
* @param {number} n The count of items.
* @return {goog.i18n.pluralRules.Keyword} Locale specific plural value.
* @private
*/
goog.i18n.pluralRules.mkSelect_ = function(n) {
if ((n % 10) == 1 && n != 11) {
return goog.i18n.pluralRules.Keyword.ONE;
}
return goog.i18n.pluralRules.Keyword.OTHER;
};
/**
* Plural select rules for cy locale
*
* @param {number} n The count of items.
* @return {goog.i18n.pluralRules.Keyword} Locale specific plural value.
* @private
*/
goog.i18n.pluralRules.cySelect_ = function(n) {
if (n == 0) {
return goog.i18n.pluralRules.Keyword.ZERO;
}
if (n == 1) {
return goog.i18n.pluralRules.Keyword.ONE;
}
if (n == 2) {
return goog.i18n.pluralRules.Keyword.TWO;
}
if (n == 3) {
return goog.i18n.pluralRules.Keyword.FEW;
}
if (n == 6) {
return goog.i18n.pluralRules.Keyword.MANY;
}
return goog.i18n.pluralRules.Keyword.OTHER;
};
/**
* Plural select rules for lag locale
*
* @param {number} n The count of items.
* @return {goog.i18n.pluralRules.Keyword} Locale specific plural value.
* @private
*/
goog.i18n.pluralRules.lagSelect_ = function(n) {
if (n == 0) {
return goog.i18n.pluralRules.Keyword.ZERO;
}
if (n > 0 && n < 2) {
return goog.i18n.pluralRules.Keyword.ONE;
}
return goog.i18n.pluralRules.Keyword.OTHER;
};
/**
* Plural select rules for shi locale
*
* @param {number} n The count of items.
* @return {goog.i18n.pluralRules.Keyword} Locale specific plural value.
* @private
*/
goog.i18n.pluralRules.shiSelect_ = function(n) {
if (n >= 0 && n <= 1) {
return goog.i18n.pluralRules.Keyword.ONE;
}
if (n >= 2 && n <= 10 && n == Math.floor(n)) {
return goog.i18n.pluralRules.Keyword.FEW;
}
return goog.i18n.pluralRules.Keyword.OTHER;
};
/**
* Plural select rules for br locale
*
* @param {number} n The count of items.
* @return {goog.i18n.pluralRules.Keyword} Locale specific plural value.
* @private
*/
goog.i18n.pluralRules.brSelect_ = function(n) {
if (n == 0) {
return goog.i18n.pluralRules.Keyword.ZERO;
}
if (n == 1) {
return goog.i18n.pluralRules.Keyword.ONE;
}
if (n == 2) {
return goog.i18n.pluralRules.Keyword.TWO;
}
if (n == 3) {
return goog.i18n.pluralRules.Keyword.FEW;
}
if (n == 6) {
return goog.i18n.pluralRules.Keyword.MANY;
}
return goog.i18n.pluralRules.Keyword.OTHER;
};
/**
* Selected plural rules by locale.
*/
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
if (goog.LOCALE == 'am') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.filSelect_;
}
if (goog.LOCALE == 'ar') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.arSelect_;
}
if (goog.LOCALE == 'bg') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'bn') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'br') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.brSelect_;
}
if (goog.LOCALE == 'ca') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'cs') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.csSelect_;
}
if (goog.LOCALE == 'da') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'de') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'de_AT' || goog.LOCALE == 'de-AT') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'de_CH' || goog.LOCALE == 'de-CH') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'el') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'en') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'en_AU' || goog.LOCALE == 'en-AU') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'en_GB' || goog.LOCALE == 'en-GB') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'en_IE' || goog.LOCALE == 'en-IE') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'en_IN' || goog.LOCALE == 'en-IN') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'en_SG' || goog.LOCALE == 'en-SG') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'en_US' || goog.LOCALE == 'en-US') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'en_ZA' || goog.LOCALE == 'en-ZA') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'es') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'et') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'eu') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'fa') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;
}
if (goog.LOCALE == 'fi') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'fil') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.filSelect_;
}
if (goog.LOCALE == 'fr') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.frSelect_;
}
if (goog.LOCALE == 'fr_CA' || goog.LOCALE == 'fr-CA') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.frSelect_;
}
if (goog.LOCALE == 'gl') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'gsw') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'gu') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'he') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'hi') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.filSelect_;
}
if (goog.LOCALE == 'hr') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.hrSelect_;
}
if (goog.LOCALE == 'hu') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;
}
if (goog.LOCALE == 'id') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;
}
if (goog.LOCALE == 'in') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;
}
if (goog.LOCALE == 'is') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'it') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'iw') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'ja') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;
}
if (goog.LOCALE == 'kn') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;
}
if (goog.LOCALE == 'ko') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;
}
if (goog.LOCALE == 'ln') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.filSelect_;
}
if (goog.LOCALE == 'lt') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.ltSelect_;
}
if (goog.LOCALE == 'lv') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.lvSelect_;
}
if (goog.LOCALE == 'ml') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'mo') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.roSelect_;
}
if (goog.LOCALE == 'mr') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'ms') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;
}
if (goog.LOCALE == 'mt') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.mtSelect_;
}
if (goog.LOCALE == 'nl') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'no') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'or') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'pl') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.plSelect_;
}
if (goog.LOCALE == 'pt') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'pt_BR' || goog.LOCALE == 'pt-BR') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'pt_PT' || goog.LOCALE == 'pt-PT') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'ro') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.roSelect_;
}
if (goog.LOCALE == 'ru') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.hrSelect_;
}
if (goog.LOCALE == 'sk') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.csSelect_;
}
if (goog.LOCALE == 'sl') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.slSelect_;
}
if (goog.LOCALE == 'sq') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'sr') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.hrSelect_;
}
if (goog.LOCALE == 'sv') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'sw') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'ta') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'te') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'th') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;
}
if (goog.LOCALE == 'tl') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.filSelect_;
}
if (goog.LOCALE == 'tr') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;
}
if (goog.LOCALE == 'uk') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.hrSelect_;
}
if (goog.LOCALE == 'ur') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;
}
if (goog.LOCALE == 'vi') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;
}
if (goog.LOCALE == 'zh') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;
}
if (goog.LOCALE == 'zh_CN' || goog.LOCALE == 'zh-CN') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;
}
if (goog.LOCALE == 'zh_HK' || goog.LOCALE == 'zh-HK') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;
}
if (goog.LOCALE == 'zh_TW' || goog.LOCALE == 'zh-TW') {
goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;
}
+185
View File
@@ -0,0 +1,185 @@
describe("localized filters", function() {
describe("es locale", function() {
beforeEach(function() {
browser().navigateTo("localeTest_es.html");
});
it('should check filters for es locale', function() {
expect(binding('input | date:"medium"')).toBe('03/06/1977 18:07:23');
expect(binding('input | date:"longDate"')).toBe("3 de junio de 1977");
expect(binding('input | number')).toBe('234.234.443.432');
expect(binding('input | currency')).toBe('€&nbsp;234.234.443.432,00');
});
});
describe("cs locale", function() {
beforeEach(function() {
browser().navigateTo("localeTest_cs.html");
});
it('should check filters for cs locale', function() {
expect(binding('input | date:"medium"')).toBe('3.6.1977 18:07:23');
expect(binding('input | date:"longDate"')).toBe("3. června 1977");
expect(binding('input | number')).toBe('234&nbsp;234&nbsp;443&nbsp;432');
expect(binding('input | currency')).toBe('234&nbsp;234&nbsp;443&nbsp;432,00&nbsp;K\u010d');
});
});
describe("de locale", function() {
beforeEach(function() {
browser().navigateTo("localeTest_de.html");
});
it('should check filters for de locale', function() {
expect(binding('input | date:"medium"')).toBe('03.06.1977 18:07:23');
expect(binding('input | date:"longDate"')).toBe("3. Juni 1977");
expect(binding('input | number')).toBe('234.234.443.432');
expect(binding('input | currency')).toBe('234.234.443.432,00&nbsp;€');
});
});
describe("en locale", function() {
beforeEach(function() {
browser().navigateTo("localeTest_en.html");
});
it('should check filters for en locale', function() {
expect(binding('input | date:"medium"')).toBe('Jun 3, 1977 6:07:23 PM');
expect(binding('input | date:"longDate"')).toBe("June 3, 1977");
expect(binding('input | number')).toBe('234,234,443,432');
expect(binding('input | currency')).toBe('$234,234,443,432.00');
});
describe('ng:pluralize for en locale', function() {
it('should show pluralized strings', function() {
expect(element('.ng-pluralize:first').html()).toBe('You have one email!');
input('plInput').enter('0');
expect(element('.ng-pluralize:first').html()).toBe('You have no email!');
input('plInput').enter('3');
expect(element('.ng-pluralize:first').html()).toBe('You have 3 emails!');
});
it('should show pluralized strings with offsets', function() {
expect(element('.ng-pluralize:last').html()).toBe('Shanjian is viewing!');
input('plInput2').enter('0');
expect(element('.ng-pluralize:last').html()).toBe('Nobody is viewing!');
input('plInput2').enter('2');
expect(element('.ng-pluralize:last').html()).toBe('Shanjian and Di are viewing!');
input('plInput2').enter('3');
expect(element('.ng-pluralize:last').html()).
toBe('Shanjian, Di and one other person are viewing!');
input('plInput2').enter('4');
expect(element('.ng-pluralize:last').html()).
toBe('Shanjian, Di and 2 other people are viewing!');
});
it('should show pluralized strings with correct data-binding', function() {
input('plInput2').enter('2');
expect(element('.ng-pluralize:last').html()).toBe('Shanjian and Di are viewing!');
input('person1').enter('Igor');
expect(element('.ng-pluralize:last').html()).toBe('Igor and Di are viewing!');
input('person2').enter('Vojta');
expect(element('.ng-pluralize:last').html()).toBe('Igor and Vojta are viewing!');
});
})
});
describe("sk locale", function() {
beforeEach(function() {
browser().navigateTo("localeTest_sk.html");
});
it('should check filters for sk locale', function() {
expect(binding('input | date:"medium"')).toBe('3.6.1977 18:07:23');
expect(binding('input | date:"longDate"')).toBe("3. júna 1977");
expect(binding('input | number')).toBe('234&nbsp;234&nbsp;443&nbsp;432');
expect(binding('input | currency')).toBe('234&nbsp;234&nbsp;443&nbsp;432,00&nbsp;Sk');
});
describe('ng:pluralize for sk locale', function() {
it('should show pluralized strings', function() {
expect(element('.ng-pluralize').html()).toBe('Mas jeden email!');
input('plInput').enter('0');
expect(element('.ng-pluralize:first').html()).toBe('Mas 0 emailov!');
input('plInput').enter('3');
expect(element('.ng-pluralize:first').html()).toBe('Mas 3 emaily!');
input('plInput').enter('4');
expect(element('.ng-pluralize:first').html()).toBe('Mas 4 emaily!');
input('plInput').enter('6');
expect(element('.ng-pluralize:first').html()).toBe('Mas 6 emailov!');
});
it('should show pluralized strings with offsets', function() {
//TODO(Igor): add offsets for sk
});
it('should show pluralized strings with correct data-binding', function() {
});
})
});
describe("zh locale", function() {
beforeEach(function() {
browser().navigateTo("localeTest_zh.html");
});
it('should check filters for zh locale', function() {
expect(binding('input | date:"medium"')).toBe('1977-6-3 下午6:07:23');
expect(binding('input | date:"longDate"')).toBe("1977年6月3日");
expect(binding('input | number')).toBe('234,234,443,432');
expect(binding('input | currency')).toBe('¥234,234,443,432.00');
});
describe('ng:pluralize for zh locale', function() {
it('should show pluralized strings', function() {
expect(element('.ng-pluralize:first').html()).toBe('1人在浏览该文件!');
input('plInput').enter('0');
expect(element('.ng-pluralize:first').html()).toBe('0人在浏览该文件!');
input('plInput').enter('3');
expect(element('.ng-pluralize:first').html()).toBe('3人在浏览该文件!');
});
it('should show pluralized strings with offsets', function() {
expect(element('.ng-pluralize:last').html()).toBe('Shanjian 在浏览该文件!');
input('plInput2').enter('0');
expect(element('.ng-pluralize:last').html()).toBe('没有人在浏览该文件!');
input('plInput2').enter('2');
expect(element('.ng-pluralize:last').html()).toBe('Shanjian 和 Di 在浏览该文件!');
input('plInput2').enter('3');
expect(element('.ng-pluralize:last').html()).
toBe('Shanjian, Di 还有其他1 人在浏览该文件!');
});
it('should show pluralized strings with correct data-binding', function() {
input('plInput2').enter('2');
expect(element('.ng-pluralize:last').html()).toBe('Shanjian 和 Di 在浏览该文件!');
input('person1').enter('彭迪');
expect(element('.ng-pluralize:last').html()).toBe('彭迪 和 Di 在浏览该文件!');
input('person2').enter('一哥');
expect(element('.ng-pluralize:last').html()).toBe('彭迪 和 一哥 在浏览该文件!');
});
})
});
});
+16
View File
@@ -0,0 +1,16 @@
<!document html>
<html>
<head>
<meta charset="utf-8">
<title>locale test</title>
<script src="../../build/angular.js" ng:autobind></script>
<script src="../../build/i18n/angular-locale_cs.js"></script>
</head>
<body>
<input type="text" name="input" value="234234443432"><br>
date: {{input | date:"medium"}}<br>
date: {{input | date:"longDate"}}<br>
number: {{input | number}}<br>
currency: {{input | currency }}
</body>
</html>
+16
View File
@@ -0,0 +1,16 @@
<!document html>
<html>
<head>
<meta charset="utf-8">
<title>locale test</title>
<script src="../../build/angular.js" ng:autobind></script>
<script src="../../build/i18n/angular-locale_de.js"></script>
</head>
<body>
<input type="text" name="input" value="234234443432"><br>
date: {{input | date:"medium"}}<br>
date: {{input | date:"longDate"}}<br>
number: {{input | number}}<br>
currency: {{input | currency }}
</body>
</html>
+39
View File
@@ -0,0 +1,39 @@
<!document html>
<html>
<head>
<meta charset="utf-8">
<title>locale test</title>
<script src="../../build/angular.js" ng:autobind></script>
<!-- not needed, already bundled in angular.js
<script src="../../build/i18n/angular-locale_en.js"></script>
-->
</head>
<body>
<h3>Datetime/Number/Currency filters demo:</h3>
<input type="text" name="input" value="234234443432"><br>
date(medium): {{input | date:"medium"}}<br>
date(longDate): {{input | date:"longDate"}}<br>
number: {{input | number}}<br>
currency: {{input | currency }}
<hr/>
<h3>Pluralization demo:</h3>
<input type="text" name="plInput" value="1"><br>
<ng:pluralize count="plInput"
when= "{ '0': 'You have no email!',
'one': 'You have one email!',
'other': 'You have {} emails!'}">
</ng:pluralize>
<hr/>
<h3>Pluralization demo with offsets:</h3>
Name of person1:<input type="text" name="person1" value="Shanjian"/><br/>
Name of person2:<input type="text" name="person2" value="Di"/><br/>
<input type="text" name="plInput2" value="1"><br>
<ng:pluralize count="plInput2" offset=2
when= "{'0':'Nobody is viewing!',
'1': '{{person1}} is viewing!',
'2': '{{person1}} and {{person2}} are viewing!',
'3': '{{person1}}, {{person2}} and one other person are viewing!',
'other': '{{person1}}, {{person2}} and {} other people are viewing!'}">
</ng:pluralize>
</body>
</html>
+16
View File
@@ -0,0 +1,16 @@
<!document html>
<html>
<head>
<meta charset="utf-8">
<title>locale test</title>
<script src="../../build/angular.js" ng:autobind></script>
<script src="../../build/i18n/angular-locale_es.js"></script>
</head>
<body>
<input type="text" name="input" value="234234443432"><br>
date: {{input | date:"medium"}}<br>
date: {{input | date:"longDate"}}<br>
number: {{input | number}}<br>
currency: {{input | currency }}
</body>
</html>
+23
View File
@@ -0,0 +1,23 @@
<!document html>
<html>
<head>
<meta charset="utf-8">
<title>locale test</title>
<script src="../../build/angular.js" ng:autobind></script>
<script src="../../build/i18n/angular-locale_sk-sk.js"></script>
</head>
<body>
<input type="text" name="input" value="234234443432"><br>
date: {{input | date:"medium"}}<br>
date: {{input | date:"longDate"}}<br>
number: {{input | number}}<br>
currency: {{input | currency }}
<hr/>
<input type="text" name="plInput" value="1"><br>
<ng:pluralize count="plInput"
when= "{ 'one': 'Mas jeden email!',
'few': 'Mas {} emaily!',
'other': 'Mas {} emailov!'}">
</ng:pluralize>
</body>
</html>
+34
View File
@@ -0,0 +1,34 @@
<!document html>
<html>
<head>
<meta charset="utf-8">
<title>locale test</title>
<script src="../../build/angular.js" ng:autobind></script>
<script src="../../build/i18n/angular-locale_zh-cn.js"></script>
</head>
<body>
<h3>Datetime/Number/Currency filters demo:</h3>
<input type="text" name="input" value="234234443432"><br>
date(medium): {{input | date:"medium"}}<br>
date(longDate): {{input | date:"longDate"}}<br>
number: {{input | number}}<br>
currency: {{input | currency }}
<hr/>
<h3>Pluralization demo:</h3>
<input type="text" name="plInput" value="1"><br>
<ng:pluralize count="plInput"
when= "{'other':'{}人在浏览该文件!'}">
</ng:pluralize>
<hr/>
<h3>Pluralization demo with offsets:</h3>
Name of person1:<input type="text" name="person1" value="Shanjian"/><br/>
Name of person2:<input type="text" name="person2" value="Di"/><br/>
<input type="text" name="plInput2" value="1"><br>
<ng:pluralize count="plInput2" offset=2
when= "{'0':'没有人在浏览该文件!',
'1': '{{person1}} 在浏览该文件!',
'2': '{{person1}} 和 {{person2}} 在浏览该文件!',
'other': '{{person1}}, {{person2}} 还有其他{} 人在浏览该文件!'}">
</ng:pluralize>
</body>
</html>
+11
View File
@@ -0,0 +1,11 @@
<!DOCTYPE HTML>
<html xmlns:ng="http://angularjs.org" wiki:ng="http://angularjs.org">
<head>
<meta charset="utf-8">
<title>&lt;angular/&gt; Docs Scenario Runner</title>
<script type="text/javascript" src="../../build/angular-scenario.js" ng:autotest></script>
<script type="text/javascript" src="i18n-e2e.js"></script>
</head>
<body>
</body>
</html>
+7
View File
@@ -0,0 +1,7 @@
#!/bin/bash
BASE_DIR=`dirname $0`
cd $BASE_DIR
/usr/bin/env jasmine-node spec/ --noColor && node src/closureSlurper.js
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"NUMBER_FORMATS":{"DECIMAL_SEP":".","GROUP_SEP":",","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"\u00A4","posSuf":"","negPre":"(\u00A4","negSuf":")","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"Br"},"pluralCat":function (n) { if (n == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"DATETIME_FORMATS":{"MONTH":["ጃንዩወሪ","ፌብሩወሪ","ማርች","ኤፕረል","ሜይ","ጁን","ጁላይ","ኦገስት","ሴፕቴምበር","ኦክተውበር","ኖቬምበር","ዲሴምበር"],"SHORTMONTH":["ጃንዩ","ፌብሩ","ማርች","ኤፕረ","ሜይ","ጁን","ጁላይ","ኦገስ","ሴፕቴ","ኦክተ","ኖቬም","ዲሴም"],"DAY":["እሑድ","ሰኞ","ማክሰኞ","ረቡዕ","ሐሙስ","ዓርብ","ቅዳሜ"],"SHORTDAY":["እሑድ","ሰኞ","ማክሰ","ረቡዕ","ሐሙስ","ዓርብ","ቅዳሜ"],"AMPMS":["ጡዋት","ከሳዓት"],"medium":"d MMM y h:mm:ss a","short":"dd/MM/yyyy h:mm a","fullDate":"EEEE, d MMMM y","longDate":"d MMMM y","mediumDate":"d MMM y","shortDate":"dd/MM/yyyy","mediumTime":"h:mm:ss a","shortTime":"h:mm a"},"id":"am-et"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"DATETIME_FORMATS":{"MONTH":["ጃንዩወሪ","ፌብሩወሪ","ማርች","ኤፕረል","ሜይ","ጁን","ጁላይ","ኦገስት","ሴፕቴምበር","ኦክተውበር","ኖቬምበር","ዲሴምበር"],"SHORTMONTH":["ጃንዩ","ፌብሩ","ማርች","ኤፕረ","ሜይ","ጁን","ጁላይ","ኦገስ","ሴፕቴ","ኦክተ","ኖቬም","ዲሴም"],"DAY":["እሑድ","ሰኞ","ማክሰኞ","ረቡዕ","ሐሙስ","ዓርብ","ቅዳሜ"],"SHORTDAY":["እሑድ","ሰኞ","ማክሰ","ረቡዕ","ሐሙስ","ዓርብ","ቅዳሜ"],"AMPMS":["ጡዋት","ከሳዓት"],"medium":"d MMM y h:mm:ss a","short":"dd/MM/yyyy h:mm a","fullDate":"EEEE, d MMMM y","longDate":"d MMMM y","mediumDate":"d MMM y","shortDate":"dd/MM/yyyy","mediumTime":"h:mm:ss a","shortTime":"h:mm a"},"NUMBER_FORMATS":{"DECIMAL_SEP":".","GROUP_SEP":",","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"\u00A4","posSuf":"","negPre":"(\u00A4","negSuf":")","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"Br"},"pluralCat":function (n) { if (n == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"id":"am"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"NUMBER_FORMATS":{"DECIMAL_SEP":",","GROUP_SEP":".","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"","negSuf":"-","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"\u00A4 ","posSuf":"","negPre":"\u00A4 ","negSuf":"-","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"£"},"pluralCat":function (n) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if ((n % 100) >= 3 && (n % 100) <= 10 && n == Math.floor(n)) { return PLURAL_CATEGORY.FEW; } if ((n % 100) >= 11 && (n % 100) <= 99 && n == Math.floor(n)) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;},"DATETIME_FORMATS":{"MONTH":["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],"SHORTMONTH":["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],"DAY":["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],"SHORTDAY":["أحد","إثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],"AMPMS":["ص","م"],"medium":"dd/MM/yyyy h:mm:ss a","short":"d/M/yyyy h:mm a","fullDate":"EEEE، d MMMM، y","longDate":"d MMMM، y","mediumDate":"dd/MM/yyyy","shortDate":"d/M/yyyy","mediumTime":"h:mm:ss a","shortTime":"h:mm a"},"id":"ar-eg"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"DATETIME_FORMATS":{"MONTH":["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],"SHORTMONTH":["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],"DAY":["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],"SHORTDAY":["أحد","إثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],"AMPMS":["ص","م"],"medium":"dd/MM/yyyy h:mm:ss a","short":"d/M/yyyy h:mm a","fullDate":"EEEE، d MMMM، y","longDate":"d MMMM، y","mediumDate":"dd/MM/yyyy","shortDate":"d/M/yyyy","mediumTime":"h:mm:ss a","shortTime":"h:mm a"},"NUMBER_FORMATS":{"DECIMAL_SEP":",","GROUP_SEP":".","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"","negSuf":"-","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"\u00A4 ","posSuf":"","negPre":"\u00A4 ","negSuf":"-","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"£"},"pluralCat":function (n) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if ((n % 100) >= 3 && (n % 100) <= 10 && n == Math.floor(n)) { return PLURAL_CATEGORY.FEW; } if ((n % 100) >= 11 && (n % 100) <= 99 && n == Math.floor(n)) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;},"id":"ar"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"NUMBER_FORMATS":{"DECIMAL_SEP":",","GROUP_SEP":" ","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"","posSuf":" \u00A4","negPre":"-","negSuf":" \u00A4","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"лв"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"DATETIME_FORMATS":{"MONTH":["януари","февруари","март","април","май","юни","юли","август","септември","октомври","ноември","декември"],"SHORTMONTH":["ян.","февр.","март","апр.","май","юни","юли","авг.","септ.","окт.","ноем.","дек."],"DAY":["неделя","понеделник","вторник","сряда","четвъртък","петък","събота"],"SHORTDAY":["нд","пн","вт","ср","чт","пт","сб"],"AMPMS":["пр. об.","сл. об."],"medium":"dd.MM.yyyy HH:mm:ss","short":"dd.MM.yy HH:mm","fullDate":"dd MMMM y, EEEE","longDate":"dd MMMM y","mediumDate":"dd.MM.yyyy","shortDate":"dd.MM.yy","mediumTime":"HH:mm:ss","shortTime":"HH:mm"},"id":"bg-bg"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"DATETIME_FORMATS":{"MONTH":["януари","февруари","март","април","май","юни","юли","август","септември","октомври","ноември","декември"],"SHORTMONTH":["ян.","февр.","март","апр.","май","юни","юли","авг.","септ.","окт.","ноем.","дек."],"DAY":["неделя","понеделник","вторник","сряда","четвъртък","петък","събота"],"SHORTDAY":["нд","пн","вт","ср","чт","пт","сб"],"AMPMS":["пр. об.","сл. об."],"medium":"dd.MM.yyyy HH:mm:ss","short":"dd.MM.yy HH:mm","fullDate":"dd MMMM y, EEEE","longDate":"dd MMMM y","mediumDate":"dd.MM.yyyy","shortDate":"dd.MM.yy","mediumTime":"HH:mm:ss","shortTime":"HH:mm"},"NUMBER_FORMATS":{"DECIMAL_SEP":",","GROUP_SEP":" ","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"","posSuf":" \u00A4","negPre":"-","negSuf":" \u00A4","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"лв"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"id":"bg"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"NUMBER_FORMATS":{"DECIMAL_SEP":".","GROUP_SEP":",","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":2,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"","posSuf":"\u00A4","negPre":"(","negSuf":"\u00A4)","gSize":2,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"৳"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"DATETIME_FORMATS":{"MONTH":["জানুয়ারী","ফেব্রুয়ারী","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর"],"SHORTMONTH":["জানুয়ারী","ফেব্রুয়ারী","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর"],"DAY":["রবিবার","সোমবার","মঙ্গলবার","বুধবার","বৃহষ্পতিবার","শুক্রবার","শনিবার"],"SHORTDAY":["রবি","সোম","মঙ্গল","বুধ","বৃহস্পতি","শুক্র","শনি"],"AMPMS":["am","pm"],"medium":"d MMM, y h:mm:ss a","short":"d/M/yy h:mm a","fullDate":"EEEE, d MMMM, y","longDate":"d MMMM, y","mediumDate":"d MMM, y","shortDate":"d/M/yy","mediumTime":"h:mm:ss a","shortTime":"h:mm a"},"id":"bn-bd"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"DATETIME_FORMATS":{"MONTH":["জানুয়ারী","ফেব্রুয়ারী","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর"],"SHORTMONTH":["জানুয়ারী","ফেব্রুয়ারী","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর"],"DAY":["রবিবার","সোমবার","মঙ্গলবার","বুধবার","বৃহষ্পতিবার","শুক্রবার","শনিবার"],"SHORTDAY":["রবি","সোম","মঙ্গল","বুধ","বৃহস্পতি","শুক্র","শনি"],"AMPMS":["am","pm"],"medium":"d MMM, y h:mm:ss a","short":"d/M/yy h:mm a","fullDate":"EEEE, d MMMM, y","longDate":"d MMMM, y","mediumDate":"d MMM, y","shortDate":"d/M/yy","mediumTime":"h:mm:ss a","shortTime":"h:mm a"},"NUMBER_FORMATS":{"DECIMAL_SEP":".","GROUP_SEP":",","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":2,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"","posSuf":"\u00A4","negPre":"(","negSuf":"\u00A4)","gSize":2,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"৳"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"id":"bn"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"NUMBER_FORMATS":{"DECIMAL_SEP":",","GROUP_SEP":".","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"","posSuf":" \u00A4","negPre":"-","negSuf":" \u00A4","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"€"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"DATETIME_FORMATS":{"MONTH":["de gener","de febrer","de març","dabril","de maig","de juny","de juliol","dagost","de setembre","doctubre","de novembre","de desembre"],"SHORTMONTH":["de gen.","de febr.","de març","dabr.","de maig","de juny","de jul.","dag.","de set.","doct.","de nov.","de des."],"DAY":["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"],"SHORTDAY":["dg.","dl.","dt.","dc.","dj.","dv.","ds."],"AMPMS":["a.m.","p.m."],"medium":"dd/MM/yyyy H:mm:ss","short":"dd/MM/yy H:mm","fullDate":"EEEE d MMMM 'de' y","longDate":"d MMMM 'de' y","mediumDate":"dd/MM/yyyy","shortDate":"dd/MM/yy","mediumTime":"H:mm:ss","shortTime":"H:mm"},"id":"ca-es"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"DATETIME_FORMATS":{"MONTH":["de gener","de febrer","de març","dabril","de maig","de juny","de juliol","dagost","de setembre","doctubre","de novembre","de desembre"],"SHORTMONTH":["de gen.","de febr.","de març","dabr.","de maig","de juny","de jul.","dag.","de set.","doct.","de nov.","de des."],"DAY":["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"],"SHORTDAY":["dg.","dl.","dt.","dc.","dj.","dv.","ds."],"AMPMS":["a.m.","p.m."],"medium":"dd/MM/yyyy H:mm:ss","short":"dd/MM/yy H:mm","fullDate":"EEEE d MMMM 'de' y","longDate":"d MMMM 'de' y","mediumDate":"dd/MM/yyyy","shortDate":"dd/MM/yy","mediumTime":"H:mm:ss","shortTime":"H:mm"},"NUMBER_FORMATS":{"DECIMAL_SEP":",","GROUP_SEP":".","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"","posSuf":" \u00A4","negPre":"-","negSuf":" \u00A4","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"€"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"id":"ca"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"NUMBER_FORMATS":{"DECIMAL_SEP":",","GROUP_SEP":" ","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"","posSuf":" \u00A4","negPre":"-","negSuf":" \u00A4","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"Kč"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2 || n == 3 || n == 4) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;},"DATETIME_FORMATS":{"MONTH":["ledna","února","března","dubna","května","června","července","srpna","září","října","listopadu","prosince"],"SHORTMONTH":["1","2","3","4","5","6","7","8","9","10","11","12"],"DAY":["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"],"SHORTDAY":["ne","po","út","st","čt","pá","so"],"AMPMS":["dop.","odp."],"medium":"d.M.yyyy H:mm:ss","short":"d.M.yy H:mm","fullDate":"EEEE, d. MMMM y","longDate":"d. MMMM y","mediumDate":"d.M.yyyy","shortDate":"d.M.yy","mediumTime":"H:mm:ss","shortTime":"H:mm"},"id":"cs-cz"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"DATETIME_FORMATS":{"MONTH":["ledna","února","března","dubna","května","června","července","srpna","září","října","listopadu","prosince"],"SHORTMONTH":["1","2","3","4","5","6","7","8","9","10","11","12"],"DAY":["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"],"SHORTDAY":["ne","po","út","st","čt","pá","so"],"AMPMS":["dop.","odp."],"medium":"d.M.yyyy H:mm:ss","short":"d.M.yy H:mm","fullDate":"EEEE, d. MMMM y","longDate":"d. MMMM y","mediumDate":"d.M.yyyy","shortDate":"d.M.yy","mediumTime":"H:mm:ss","shortTime":"H:mm"},"NUMBER_FORMATS":{"DECIMAL_SEP":",","GROUP_SEP":" ","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"","posSuf":" \u00A4","negPre":"-","negSuf":" \u00A4","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"Kč"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2 || n == 3 || n == 4) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;},"id":"cs"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"NUMBER_FORMATS":{"DECIMAL_SEP":",","GROUP_SEP":".","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"","posSuf":" \u00A4","negPre":"-","negSuf":" \u00A4","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"kr"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"DATETIME_FORMATS":{"MONTH":["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december"],"SHORTMONTH":["jan.","feb.","mar.","apr.","maj","jun.","jul.","aug.","sep.","okt.","nov.","dec."],"DAY":["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],"SHORTDAY":["søn","man","tir","ons","tor","fre","lør"],"AMPMS":["f.m.","e.m."],"medium":"dd/MM/yyyy HH.mm.ss","short":"dd/MM/yy HH.mm","fullDate":"EEEE 'den' d. MMMM y","longDate":"d. MMM y","mediumDate":"dd/MM/yyyy","shortDate":"dd/MM/yy","mediumTime":"HH.mm.ss","shortTime":"HH.mm"},"id":"da-dk"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"DATETIME_FORMATS":{"MONTH":["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december"],"SHORTMONTH":["jan.","feb.","mar.","apr.","maj","jun.","jul.","aug.","sep.","okt.","nov.","dec."],"DAY":["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],"SHORTDAY":["søn","man","tir","ons","tor","fre","lør"],"AMPMS":["f.m.","e.m."],"medium":"dd/MM/yyyy HH.mm.ss","short":"dd/MM/yy HH.mm","fullDate":"EEEE 'den' d. MMMM y","longDate":"d. MMM y","mediumDate":"dd/MM/yyyy","shortDate":"dd/MM/yy","mediumTime":"HH.mm.ss","shortTime":"HH.mm"},"NUMBER_FORMATS":{"DECIMAL_SEP":",","GROUP_SEP":".","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"","posSuf":" \u00A4","negPre":"-","negSuf":" \u00A4","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"kr"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"id":"da"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"DATETIME_FORMATS":{"MONTH":["Jänner","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],"SHORTMONTH":["Jän","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],"DAY":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"SHORTDAY":["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],"AMPMS":["vorm.","nachm."],"medium":"dd.MM.yyyy HH:mm:ss","short":"dd.MM.yy HH:mm","fullDate":"EEEE, dd. MMMM y","longDate":"dd. MMMM y","mediumDate":"dd.MM.yyyy","shortDate":"dd.MM.yy","mediumTime":"HH:mm:ss","shortTime":"HH:mm"},"NUMBER_FORMATS":{"DECIMAL_SEP":",","GROUP_SEP":".","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"\u00A4 ","posSuf":"","negPre":"\u00A4 -","negSuf":"","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"€"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"id":"de-at"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"NUMBER_FORMATS":{"DECIMAL_SEP":",","GROUP_SEP":".","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"","posSuf":" \u00A4","negPre":"-","negSuf":" \u00A4","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"€"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"DATETIME_FORMATS":{"MONTH":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],"SHORTMONTH":["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],"DAY":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"SHORTDAY":["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],"AMPMS":["vorm.","nachm."],"medium":"dd.MM.yyyy HH:mm:ss","short":"dd.MM.yy HH:mm","fullDate":"EEEE, d. MMMM y","longDate":"d. MMMM y","mediumDate":"dd.MM.yyyy","shortDate":"dd.MM.yy","mediumTime":"HH:mm:ss","shortTime":"HH:mm"},"id":"de-be"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"DATETIME_FORMATS":{"MONTH":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],"SHORTMONTH":["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],"DAY":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"SHORTDAY":["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],"AMPMS":["vorm.","nachm."],"medium":"dd.MM.yyyy HH:mm:ss","short":"dd.MM.yy HH:mm","fullDate":"EEEE, d. MMMM y","longDate":"d. MMMM y","mediumDate":"dd.MM.yyyy","shortDate":"dd.MM.yy","mediumTime":"HH:mm:ss","shortTime":"HH:mm"},"NUMBER_FORMATS":{"DECIMAL_SEP":".","GROUP_SEP":"'","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"\u00A4 ","posSuf":"","negPre":"\u00A4-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"Fr."},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"id":"de-ch"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"NUMBER_FORMATS":{"DECIMAL_SEP":",","GROUP_SEP":".","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"","posSuf":" \u00A4","negPre":"-","negSuf":" \u00A4","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"€"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"DATETIME_FORMATS":{"MONTH":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],"SHORTMONTH":["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],"DAY":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"SHORTDAY":["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],"AMPMS":["vorm.","nachm."],"medium":"dd.MM.yyyy HH:mm:ss","short":"dd.MM.yy HH:mm","fullDate":"EEEE, d. MMMM y","longDate":"d. MMMM y","mediumDate":"dd.MM.yyyy","shortDate":"dd.MM.yy","mediumTime":"HH:mm:ss","shortTime":"HH:mm"},"id":"de-de"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"NUMBER_FORMATS":{"DECIMAL_SEP":",","GROUP_SEP":".","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"","posSuf":" \u00A4","negPre":"-","negSuf":" \u00A4","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"€"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"DATETIME_FORMATS":{"MONTH":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],"SHORTMONTH":["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],"DAY":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"SHORTDAY":["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],"AMPMS":["vorm.","nachm."],"medium":"dd.MM.yyyy HH:mm:ss","short":"dd.MM.yy HH:mm","fullDate":"EEEE, d. MMMM y","longDate":"d. MMMM y","mediumDate":"dd.MM.yyyy","shortDate":"dd.MM.yy","mediumTime":"HH:mm:ss","shortTime":"HH:mm"},"id":"de-lu"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"DATETIME_FORMATS":{"MONTH":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],"SHORTMONTH":["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],"DAY":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"SHORTDAY":["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],"AMPMS":["vorm.","nachm."],"medium":"dd.MM.yyyy HH:mm:ss","short":"dd.MM.yy HH:mm","fullDate":"EEEE, d. MMMM y","longDate":"d. MMMM y","mediumDate":"dd.MM.yyyy","shortDate":"dd.MM.yy","mediumTime":"HH:mm:ss","shortTime":"HH:mm"},"NUMBER_FORMATS":{"DECIMAL_SEP":",","GROUP_SEP":".","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"","posSuf":" \u00A4","negPre":"-","negSuf":" \u00A4","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"€"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"id":"de"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"NUMBER_FORMATS":{"DECIMAL_SEP":",","GROUP_SEP":".","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"","posSuf":" \u00A4","negPre":"-","negSuf":" \u00A4","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"€"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"DATETIME_FORMATS":{"MONTH":["Ιανουαρίου","Φεβρουαρίου","Μαρτίου","Απριλίου","Μαΐου","Ιουνίου","Ιουλίου","Αυγούστου","Σεπτεμβρίου","Οκτωβρίου","Νοεμβρίου","Δεκεμβρίου"],"SHORTMONTH":["Ιαν","Φεβ","Μαρ","Απρ","Μαϊ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],"DAY":["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"],"SHORTDAY":["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],"AMPMS":["π.μ.","μ.μ."],"medium":"d MMM y h:mm:ss a","short":"d/M/yy h:mm a","fullDate":"EEEE, d MMMM y","longDate":"d MMMM y","mediumDate":"d MMM y","shortDate":"d/M/yy","mediumTime":"h:mm:ss a","shortTime":"h:mm a"},"id":"el-gr"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"NUMBER_FORMATS":{"DECIMAL_SEP":",","GROUP_SEP":".","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"","posSuf":" \u00A4","negPre":"-","negSuf":" \u00A4","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"€"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"DATETIME_FORMATS":{"MONTH":["Ιανουαρίου","Φεβρουαρίου","Μαρτίου","Απριλίου","Μαΐου","Ιουνίου","Ιουλίου","Αυγούστου","Σεπτεμβρίου","Οκτωβρίου","Νοεμβρίου","Δεκεμβρίου"],"SHORTMONTH":["Ιαν","Φεβ","Μαρ","Απρ","Μαϊ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],"DAY":["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"],"SHORTDAY":["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],"AMPMS":["π.μ.","μ.μ."],"medium":"d MMM y h:mm:ss a","short":"d/M/yy h:mm a","fullDate":"EEEE, d MMMM y","longDate":"d MMMM y","mediumDate":"d MMM y","shortDate":"d/M/yy","mediumTime":"h:mm:ss a","shortTime":"h:mm a"},"id":"el-polyton"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"DATETIME_FORMATS":{"MONTH":["Ιανουαρίου","Φεβρουαρίου","Μαρτίου","Απριλίου","Μαΐου","Ιουνίου","Ιουλίου","Αυγούστου","Σεπτεμβρίου","Οκτωβρίου","Νοεμβρίου","Δεκεμβρίου"],"SHORTMONTH":["Ιαν","Φεβ","Μαρ","Απρ","Μαϊ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],"DAY":["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"],"SHORTDAY":["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],"AMPMS":["π.μ.","μ.μ."],"medium":"d MMM y h:mm:ss a","short":"d/M/yy h:mm a","fullDate":"EEEE, d MMMM y","longDate":"d MMMM y","mediumDate":"d MMM y","shortDate":"d/M/yy","mediumTime":"h:mm:ss a","shortTime":"h:mm a"},"NUMBER_FORMATS":{"DECIMAL_SEP":",","GROUP_SEP":".","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"","posSuf":" \u00A4","negPre":"-","negSuf":" \u00A4","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"€"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"id":"el"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"NUMBER_FORMATS":{"DECIMAL_SEP":".","GROUP_SEP":",","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"\u00A4","posSuf":"","negPre":"(\u00A4","negSuf":")","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"$"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"DATETIME_FORMATS":{"MONTH":["January","February","March","April","May","June","July","August","September","October","November","December"],"SHORTMONTH":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"DAY":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"SHORTDAY":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"AMPMS":["AM","PM"],"medium":"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a","fullDate":"EEEE, MMMM d, y","longDate":"MMMM d, y","mediumDate":"MMM d, y","shortDate":"M/d/yy","mediumTime":"h:mm:ss a","shortTime":"h:mm a"},"id":"en-as"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"DATETIME_FORMATS":{"MONTH":["January","February","March","April","May","June","July","August","September","October","November","December"],"SHORTMONTH":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"DAY":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"SHORTDAY":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"AMPMS":["AM","PM"],"medium":"dd/MM/yyyy h:mm:ss a","short":"d/MM/yy h:mm a","fullDate":"EEEE, d MMMM y","longDate":"d MMMM y","mediumDate":"dd/MM/yyyy","shortDate":"d/MM/yy","mediumTime":"h:mm:ss a","shortTime":"h:mm a"},"NUMBER_FORMATS":{"DECIMAL_SEP":".","GROUP_SEP":",","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"\u00A4","posSuf":"","negPre":"\u00A4-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"$"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"id":"en-au"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"NUMBER_FORMATS":{"DECIMAL_SEP":".","GROUP_SEP":",","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"\u00A4","posSuf":"","negPre":"(\u00A4","negSuf":")","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"$"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"DATETIME_FORMATS":{"MONTH":["January","February","March","April","May","June","July","August","September","October","November","December"],"SHORTMONTH":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"DAY":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"SHORTDAY":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"AMPMS":["AM","PM"],"medium":"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a","fullDate":"EEEE, MMMM d, y","longDate":"MMMM d, y","mediumDate":"MMM d, y","shortDate":"M/d/yy","mediumTime":"h:mm:ss a","shortTime":"h:mm a"},"id":"en-dsrt-us"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"NUMBER_FORMATS":{"DECIMAL_SEP":".","GROUP_SEP":",","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"\u00A4","posSuf":"","negPre":"(\u00A4","negSuf":")","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"$"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"DATETIME_FORMATS":{"MONTH":["January","February","March","April","May","June","July","August","September","October","November","December"],"SHORTMONTH":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"DAY":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"SHORTDAY":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"AMPMS":["AM","PM"],"medium":"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a","fullDate":"EEEE, MMMM d, y","longDate":"MMMM d, y","mediumDate":"MMM d, y","shortDate":"M/d/yy","mediumTime":"h:mm:ss a","shortTime":"h:mm a"},"id":"en-dsrt"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"DATETIME_FORMATS":{"MONTH":["January","February","March","April","May","June","July","August","September","October","November","December"],"SHORTMONTH":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"DAY":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"SHORTDAY":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"AMPMS":["AM","PM"],"medium":"d MMM y HH:mm:ss","short":"dd/MM/yyyy HH:mm","fullDate":"EEEE, d MMMM y","longDate":"d MMMM y","mediumDate":"d MMM y","shortDate":"dd/MM/yyyy","mediumTime":"HH:mm:ss","shortTime":"HH:mm"},"NUMBER_FORMATS":{"DECIMAL_SEP":".","GROUP_SEP":",","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"\u00A4","posSuf":"","negPre":"\u00A4-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"£"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"id":"en-gb"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"NUMBER_FORMATS":{"DECIMAL_SEP":".","GROUP_SEP":",","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"\u00A4","posSuf":"","negPre":"(\u00A4","negSuf":")","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"$"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"DATETIME_FORMATS":{"MONTH":["January","February","March","April","May","June","July","August","September","October","November","December"],"SHORTMONTH":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"DAY":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"SHORTDAY":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"AMPMS":["AM","PM"],"medium":"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a","fullDate":"EEEE, MMMM d, y","longDate":"MMMM d, y","mediumDate":"MMM d, y","shortDate":"M/d/yy","mediumTime":"h:mm:ss a","shortTime":"h:mm a"},"id":"en-gu"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"DATETIME_FORMATS":{"MONTH":["January","February","March","April","May","June","July","August","September","October","November","December"],"SHORTMONTH":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"DAY":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"SHORTDAY":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"AMPMS":["a.m.","p.m."],"medium":"d MMM y HH:mm:ss","short":"dd/MM/yyyy HH:mm","fullDate":"EEEE d MMMM y","longDate":"d MMMM y","mediumDate":"d MMM y","shortDate":"dd/MM/yyyy","mediumTime":"HH:mm:ss","shortTime":"HH:mm"},"NUMBER_FORMATS":{"DECIMAL_SEP":".","GROUP_SEP":",","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"\u00A4","posSuf":"","negPre":"\u00A4-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"€"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"id":"en-ie"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"DATETIME_FORMATS":{"MONTH":["January","February","March","April","May","June","July","August","September","October","November","December"],"SHORTMONTH":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"DAY":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"SHORTDAY":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"AMPMS":["AM","PM"],"medium":"dd-MMM-y h:mm:ss a","short":"dd/MM/yy h:mm a","fullDate":"EEEE d MMMM y","longDate":"d MMMM y","mediumDate":"dd-MMM-y","shortDate":"dd/MM/yy","mediumTime":"h:mm:ss a","shortTime":"h:mm a"},"NUMBER_FORMATS":{"DECIMAL_SEP":".","GROUP_SEP":",","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":2,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"\u00A4 ","posSuf":"","negPre":"\u00A4 -","negSuf":"","gSize":2,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"Rs"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"id":"en-in"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"DATETIME_FORMATS":{"MONTH":["January","February","March","April","May","June","July","August","September","October","November","December"],"SHORTMONTH":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"DAY":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"SHORTDAY":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"AMPMS":["AM","PM"],"medium":"y MMM d HH:mm:ss","short":"yyyy-MM-dd HH:mm","fullDate":"EEEE, y MMMM dd","longDate":"y MMMM d","mediumDate":"y MMM d","shortDate":"yyyy-MM-dd","mediumTime":"HH:mm:ss","shortTime":"HH:mm"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"NUMBER_FORMATS":{"DECIMAL_SEP":".","GROUP_SEP":",","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"\u00A4","posSuf":"","negPre":"(\u00A4","negSuf":")","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"$"},"id":"en-iso"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"NUMBER_FORMATS":{"DECIMAL_SEP":".","GROUP_SEP":",","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"\u00A4","posSuf":"","negPre":"(\u00A4","negSuf":")","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"$"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"DATETIME_FORMATS":{"MONTH":["January","February","March","April","May","June","July","August","September","October","November","December"],"SHORTMONTH":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"DAY":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"SHORTDAY":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"AMPMS":["AM","PM"],"medium":"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a","fullDate":"EEEE, MMMM d, y","longDate":"MMMM d, y","mediumDate":"MMM d, y","shortDate":"M/d/yy","mediumTime":"h:mm:ss a","shortTime":"h:mm a"},"id":"en-mh"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"NUMBER_FORMATS":{"DECIMAL_SEP":".","GROUP_SEP":",","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"\u00A4","posSuf":"","negPre":"(\u00A4","negSuf":")","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"$"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"DATETIME_FORMATS":{"MONTH":["January","February","March","April","May","June","July","August","September","October","November","December"],"SHORTMONTH":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"DAY":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"SHORTDAY":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"AMPMS":["AM","PM"],"medium":"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a","fullDate":"EEEE, MMMM d, y","longDate":"MMMM d, y","mediumDate":"MMM d, y","shortDate":"M/d/yy","mediumTime":"h:mm:ss a","shortTime":"h:mm a"},"id":"en-mp"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"DATETIME_FORMATS":{"MONTH":["January","February","March","April","May","June","July","August","September","October","November","December"],"SHORTMONTH":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"DAY":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"SHORTDAY":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"AMPMS":["AM","PM"],"medium":"MMM d, y h:mm:ss a","short":"d/M/yy h:mm a","fullDate":"EEEE, MMMM d, y","longDate":"MMMM d, y","mediumDate":"MMM d, y","shortDate":"d/M/yy","mediumTime":"h:mm:ss a","shortTime":"h:mm a"},"NUMBER_FORMATS":{"DECIMAL_SEP":".","GROUP_SEP":",","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"\u00A4","posSuf":"","negPre":"(\u00A4","negSuf":")","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"$"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"id":"en-sg"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"NUMBER_FORMATS":{"DECIMAL_SEP":".","GROUP_SEP":",","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"\u00A4","posSuf":"","negPre":"(\u00A4","negSuf":")","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"$"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"DATETIME_FORMATS":{"MONTH":["January","February","March","April","May","June","July","August","September","October","November","December"],"SHORTMONTH":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"DAY":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"SHORTDAY":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"AMPMS":["AM","PM"],"medium":"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a","fullDate":"EEEE, MMMM d, y","longDate":"MMMM d, y","mediumDate":"MMM d, y","shortDate":"M/d/yy","mediumTime":"h:mm:ss a","shortTime":"h:mm a"},"id":"en-um"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"DATETIME_FORMATS":{"MONTH":["January","February","March","April","May","June","July","August","September","October","November","December"],"SHORTMONTH":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"DAY":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"SHORTDAY":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"AMPMS":["AM","PM"],"medium":"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a","fullDate":"EEEE, MMMM d, y","longDate":"MMMM d, y","mediumDate":"MMM d, y","shortDate":"M/d/yy","mediumTime":"h:mm:ss a","shortTime":"h:mm a"},"NUMBER_FORMATS":{"DECIMAL_SEP":".","GROUP_SEP":",","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"\u00A4","posSuf":"","negPre":"(\u00A4","negSuf":")","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"$"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"id":"en-us"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"NUMBER_FORMATS":{"DECIMAL_SEP":".","GROUP_SEP":",","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"\u00A4","posSuf":"","negPre":"(\u00A4","negSuf":")","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"$"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"DATETIME_FORMATS":{"MONTH":["January","February","March","April","May","June","July","August","September","October","November","December"],"SHORTMONTH":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"DAY":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"SHORTDAY":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"AMPMS":["AM","PM"],"medium":"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a","fullDate":"EEEE, MMMM d, y","longDate":"MMMM d, y","mediumDate":"MMM d, y","shortDate":"M/d/yy","mediumTime":"h:mm:ss a","shortTime":"h:mm a"},"id":"en-vi"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"DATETIME_FORMATS":{"MONTH":["January","February","March","April","May","June","July","August","September","October","November","December"],"SHORTMONTH":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"DAY":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"SHORTDAY":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"AMPMS":["AM","PM"],"medium":"dd MMM y h:mm:ss a","short":"yyyy/MM/dd h:mm a","fullDate":"EEEE dd MMMM y","longDate":"dd MMMM y","mediumDate":"dd MMM y","shortDate":"yyyy/MM/dd","mediumTime":"h:mm:ss a","shortTime":"h:mm a"},"NUMBER_FORMATS":{"DECIMAL_SEP":",","GROUP_SEP":" ","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"\u00A4","posSuf":"","negPre":"\u00A4-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"R"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"id":"en-za"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"NUMBER_FORMATS":{"DECIMAL_SEP":".","GROUP_SEP":",","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"\u00A4","posSuf":"","negPre":"(\u00A4","negSuf":")","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"$"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"DATETIME_FORMATS":{"MONTH":["January","February","March","April","May","June","July","August","September","October","November","December"],"SHORTMONTH":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"DAY":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"SHORTDAY":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"AMPMS":["AM","PM"],"medium":"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a","fullDate":"EEEE, MMMM d, y","longDate":"MMMM d, y","mediumDate":"MMM d, y","shortDate":"M/d/yy","mediumTime":"h:mm:ss a","shortTime":"h:mm a"},"id":"en-zz"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"DATETIME_FORMATS":{"MONTH":["January","February","March","April","May","June","July","August","September","October","November","December"],"SHORTMONTH":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"DAY":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"SHORTDAY":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"AMPMS":["AM","PM"],"medium":"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a","fullDate":"EEEE, MMMM d, y","longDate":"MMMM d, y","mediumDate":"MMM d, y","shortDate":"M/d/yy","mediumTime":"h:mm:ss a","shortTime":"h:mm a"},"NUMBER_FORMATS":{"DECIMAL_SEP":".","GROUP_SEP":",","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"\u00A4","posSuf":"","negPre":"(\u00A4","negSuf":")","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"$"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"id":"en"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"NUMBER_FORMATS":{"DECIMAL_SEP":",","GROUP_SEP":".","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"\u00A4 ","posSuf":"","negPre":"\u00A4 -","negSuf":"","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"€"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"DATETIME_FORMATS":{"MONTH":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],"SHORTMONTH":["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],"DAY":["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],"SHORTDAY":["dom","lun","mar","mié","jue","vie","sáb"],"AMPMS":["a.m.","p.m."],"medium":"dd/MM/yyyy HH:mm:ss","short":"dd/MM/yy HH:mm","fullDate":"EEEE d 'de' MMMM 'de' y","longDate":"d 'de' MMMM 'de' y","mediumDate":"dd/MM/yyyy","shortDate":"dd/MM/yy","mediumTime":"HH:mm:ss","shortTime":"HH:mm"},"id":"es-es"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"DATETIME_FORMATS":{"MONTH":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],"SHORTMONTH":["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],"DAY":["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],"SHORTDAY":["dom","lun","mar","mié","jue","vie","sáb"],"AMPMS":["a.m.","p.m."],"medium":"dd/MM/yyyy HH:mm:ss","short":"dd/MM/yy HH:mm","fullDate":"EEEE d 'de' MMMM 'de' y","longDate":"d 'de' MMMM 'de' y","mediumDate":"dd/MM/yyyy","shortDate":"dd/MM/yy","mediumTime":"HH:mm:ss","shortTime":"HH:mm"},"NUMBER_FORMATS":{"DECIMAL_SEP":",","GROUP_SEP":".","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"\u00A4 ","posSuf":"","negPre":"\u00A4 -","negSuf":"","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"€"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"id":"es"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"NUMBER_FORMATS":{"DECIMAL_SEP":",","GROUP_SEP":" ","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"","posSuf":" \u00A4","negPre":"-","negSuf":" \u00A4","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"€"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"DATETIME_FORMATS":{"MONTH":["jaanuar","veebruar","märts","aprill","mai","juuni","juuli","august","september","oktoober","november","detsember"],"SHORTMONTH":["jaan","veebr","märts","apr","mai","juuni","juuli","aug","sept","okt","nov","dets"],"DAY":["pühapäev","esmaspäev","teisipäev","kolmapäev","neljapäev","reede","laupäev"],"SHORTDAY":["P","E","T","K","N","R","L"],"AMPMS":["enne keskpäeva","pärast keskpäeva"],"medium":"dd.MM.yyyy H:mm.ss","short":"dd.MM.yy H:mm","fullDate":"EEEE, d. MMMM y","longDate":"d. MMMM y","mediumDate":"dd.MM.yyyy","shortDate":"dd.MM.yy","mediumTime":"H:mm.ss","shortTime":"H:mm"},"id":"et-ee"};
});
+4
View File
@@ -0,0 +1,4 @@
angular.service("$locale", function() {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
return {"DATETIME_FORMATS":{"MONTH":["jaanuar","veebruar","märts","aprill","mai","juuni","juuli","august","september","oktoober","november","detsember"],"SHORTMONTH":["jaan","veebr","märts","apr","mai","juuni","juuli","aug","sept","okt","nov","dets"],"DAY":["pühapäev","esmaspäev","teisipäev","kolmapäev","neljapäev","reede","laupäev"],"SHORTDAY":["P","E","T","K","N","R","L"],"AMPMS":["enne keskpäeva","pärast keskpäeva"],"medium":"dd.MM.yyyy H:mm.ss","short":"dd.MM.yy H:mm","fullDate":"EEEE, d. MMMM y","longDate":"d. MMMM y","mediumDate":"dd.MM.yyyy","shortDate":"dd.MM.yy","mediumTime":"H:mm.ss","shortTime":"H:mm"},"NUMBER_FORMATS":{"DECIMAL_SEP":",","GROUP_SEP":" ","PATTERNS":[{"minInt":1,"minFrac":0,"macFrac":0,"posPre":"","posSuf":"","negPre":"-","negSuf":"","gSize":3,"lgSize":3,"maxFrac":3},{"minInt":1,"minFrac":2,"macFrac":0,"posPre":"","posSuf":" \u00A4","negPre":"-","negSuf":" \u00A4","gSize":3,"lgSize":3,"maxFrac":2}],"CURRENCY_SYM":"€"},"pluralCat":function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;},"id":"et"};
});

Some files were not shown because too many files have changed in this diff Show More