Skip to content
Merged
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
b8a5c77
feat(*): Initial implementation of localization packages and manager.
skrustev Jul 8, 2025
e84bece
feat(localization): Add date custom formatting matching with Intl as …
skrustev Jul 9, 2025
346c4b4
feat(manager): Add lang tag support check and observer.
skrustev Jul 25, 2025
a62842a
fix(resources): Set type for all resource strings, so they reference …
skrustev Jul 25, 2025
897fbe7
fix(resources): Add .js extension to imports of resource string objec…
skrustev Jul 25, 2025
2e0fe0a
feat(core): Add getter for currency symbol.
skrustev Jul 25, 2025
84fa6a1
fix(core): Fix incorrect naming for event args.
skrustev Jul 25, 2025
9f3fb83
feat(core): Add first day of week Intl implementation.
skrustev Jul 25, 2025
9559e12
feat(core): Add currency symbol position implementation.
skrustev Jul 25, 2025
0a2d6cb
feat(core): Add ability to register resource, without overriding curr…
skrustev Jul 30, 2025
7590023
feat(core): Remove overide options from registering resources, becaus…
skrustev Jul 30, 2025
69e7377
chore(*): Remove igniteui-angular-i18n package since it will be still…
skrustev Jul 30, 2025
562f9c3
feat(*): Add linting and nodejs test runner.
skrustev Jul 31, 2025
c35d4bb
fix(core): Fix lint errors based on lint report.
skrustev Jul 31, 2025
3fecd95
feat(core): Use single variable for default locale and make locale ar…
skrustev Aug 1, 2025
7f4a7b0
feat(core): Switch to vitest for native browser testing capabilities.…
skrustev Aug 1, 2025
0671089
tests(core): Add test automation. Few fixes related to tests.
skrustev Aug 5, 2025
5008b08
fix(core): Bring back deleted lint config and fix build.
skrustev Aug 5, 2025
a80f408
feat(*): Add readme, templates and workflows for the repo.
skrustev Aug 5, 2025
fc1484f
feat(*): Use gulp to copy packages.
skrustev Aug 5, 2025
aff5903
fix(lint): Exclude gulpfile from lint.
skrustev Aug 5, 2025
7a896c1
fix(*): Add playwright install notes and workflow.
skrustev Aug 5, 2025
487d4fc
chore(*): Remove Azure badge.
skrustev Aug 5, 2025
5f61ca5
chore(*): Fix readme badge format
skrustev Aug 5, 2025
564e60a
feat(*): Apply new resources changes from igniteui-angular.
skrustev Aug 5, 2025
b6deceb
feat(core): Make getting date time formatter public and cover Date er…
skrustev Aug 8, 2025
9a93791
chore(*): Add missing doc.
skrustev Aug 8, 2025
f4246b3
fix(core): Extend native Event Target for handling internal events. R…
skrustev Aug 11, 2025
77d82de
fix(core): Various checks and tweaks to make sure there are no errors…
skrustev Aug 11, 2025
452d485
tests(core): Update tests to reflect latest changes.
skrustev Aug 11, 2025
871a728
fix(core): Apply missing sort to locale options key formatting.
skrustev Aug 11, 2025
7955083
chore(*): Format method
skrustev Aug 11, 2025
c9c553e
feat(core): Add date time format getter and add cases for h11 and fix…
skrustev Aug 14, 2025
6eb05dd
feat(core): Save resource strings based on locale language.
skrustev Aug 14, 2025
fbddf3e
feat(date-picker): Update resources with latest changes from master.
skrustev Aug 20, 2025
c2460e0
fix(core): SSR related fixes and increas max event listeners for the …
skrustev Aug 21, 2025
7ea75d4
chore(core): Small note on max listeners.
skrustev Aug 21, 2025
42ec007
fix(core): Better check for event inheritance and fix tests missing n…
skrustev Aug 21, 2025
05005e1
fix(core): Fix extension not added for utils.
skrustev Aug 22, 2025
4a71c8e
fix(core): Fix day period being uppercase.
skrustev Aug 25, 2025
9a8ae25
feat(core): Add ability to disable event triggering due to Angular is…
skrustev Aug 25, 2025
ec4865d
feat(date-range-picker): Add new resources from Angular.
skrustev Aug 25, 2025
dbf491d
fix(core): Fix default return if there's no resources.
skrustev Aug 28, 2025
c924296
feat(resources): Add index files for each language.
skrustev Aug 29, 2025
0cdd2de
feat(*): Add subfolders to both core and resoures packages.
skrustev Aug 29, 2025
b2f80ce
fix(resources): Add missing Banner resources in SV. Reorder resource …
skrustev Sep 9, 2025
14f9922
chore(*): Update workflow with correct folders and paths.
skrustev Sep 24, 2025
852b1b7
chore(*): Try setting dependency version for resources.
skrustev Sep 24, 2025
02ba45d
chore(*): Try pwsh variable syntax.
skrustev Sep 24, 2025
814c6d2
chore(*): Try another way of getting env virable in pwsh. Disable pub…
skrustev Sep 24, 2025
f245253
chore(*): Set proper version now. Enable publish back.
skrustev Sep 24, 2025
37fc224
chore(*): Set peer dep version in core package as well. Remove mappin…
skrustev Sep 24, 2025
1425752
Merge master into skrastev/localization
skrustev Sep 25, 2025
3bb6d8d
Separate core logic into smaller chunks. Add linter and more general …
skrustev Oct 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
### Description
Describe the issue.

* browser:

### Steps to reproduce

1. Step 1
2. Step 2
3. ...

### Result
What is the actual result after following the steps to reproduce?

### Expected result
What is the expected result after following the steps to reproduce?


### Attachments
Attach a sample if available, and screenshots, if applicable.
17 changes: 17 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Closes #

### Additional information (check all that apply):
- [ ] Bug fix
- [ ] New functionality
- [ ] Documentation
- [ ] CI/CD

### Checklist:
- [ ] All relevant tags have been applied to this PR
- [ ] This PR includes unit tests covering all the new code ([test guidelines](https://github.com/IgniteUI/igniteui-angular/wiki/Test-implementation-guidelines-for-Ignite-UI-for-Angular))
- [ ] This PR includes API docs for newly added methods/properties ([api docs guidelines](https://github.com/IgniteUI/igniteui-angular/wiki/Documentation-Guidelines))
- [ ] This PR includes general feature table updates in the root `README.MD`
- [ ] This PR includes `CHANGELOG.MD` updates for newly added functionality
- [ ] This PR contains breaking changes
- [ ] This PR includes behavioral changes and the feature specification has been updated with them

71 changes: 71 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '24 4 * * 0'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
42 changes: 42 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node

name: Node.js CI

on:
push:
branches: [ master, '[0-9]+.[0-9]+.x' ]
pull_request:
branches: [ master, '[0-9]+.[0-9]+.x' ]

jobs:
run-tests:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x, 22.x]

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install packages
run: npm ci
- name: Install Playwright
run: npx playwright install --with-deps --only-shell chromium
- name: Lint
run: npm run lint
- name: Build Core & Resources
run: npm run build
- name: Test
run: npm run test
- name: Publish to coveralls.io
if: github.repository == 'IgniteUI/igniteui-i18n' && matrix.node-version == '20.x'
uses: coverallsapp/[email protected]
with:
github-token: ${{ github.token }}
38 changes: 38 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Npm.js deploy

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- run: echo ${VERSION}

- run: npm ci

- name: Build the package
run: npm run build

- name: Define npm tag
run: |
if [[ ${VERSION} == *"alpha"* || ${VERSION} == *"beta"* || ${VERSION} == *"rc"* ]]; then echo "NPM_TAG=next"; else echo "NPM_TAG=latest"; fi >> $GITHUB_ENV
echo ${NPM_TAG}

- name: Version the package
run: npm version ${VERSION} --no-git-tag-version --save --verbose
working-directory: dist

- name: Publish the package
run: npm publish --tag ${NPM_TAG}
working-directory: dist
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# IDE - VSCode/VS
.vscode/*
.vs/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# Logs
logs
*.log
Expand Down Expand Up @@ -137,3 +145,10 @@ dist
# Vite logs files
vite.config.js.timestamp-*
vite.config.ts.timestamp-*


# compiled output
/dist
/tmp
/out-tsc
/test-results
16 changes: 16 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
This is a commercial product, requiring a valid paid-for license for commercial use.
This product is free to use for non-commercial educational use for students in K through 12 grades
or University programs, and for educators to use in a classroom setting as examples / tools in their curriculum.

In order for us to verify your eligibility for free usage, please register for trial at
https://Infragistics.com/Angular and open a support ticket with a request for free license.

To acquire a license for commercial usage, please register for trial at https://Infragistics.com/Angular
and refer to the purchasing options in the pricing section on the product page.

This repository includes code originally copied from https://github.com/zloirock/core-js
in the projects/igniteui-angular/src/lib/core/setImmediate.ts file. The original version of the code is MIT licensed. See the file header for details.

© Copyright 2020 INFRAGISTICS. All Rights Reserved.
The Infragistics Ultimate license & copyright applies to this distribution.
For information on that license, please go to our website https://www.infragistics.com/legal/license.
106 changes: 104 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,104 @@
# igniteui-i18n-core
Ignite UI Internationalization packages, containing localization functionality, translation resources and locale formatting.
<h1 align="center">
Ignite UI Localization - from Infragistics
</h1>

![Node.js CI](https://github.com/IgniteUI/igniteui-i18n/workflows/Node.js%20CI/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/IgniteUI/igniteui-i18n/badge.svg?branch=master)](https://coveralls.io/github/IgniteUI/igniteui-i18n?branch=master)
[![npm version](https://badge.fury.io/js/igniteui-i18n.svg)](https://badge.fury.io/js/igniteui-i18n)

The Ignite UI i18n repository provides localized strings and locale formatting to all Ignite UI products and components. The core package provides the functionality for locale and resource strings management, while the resources package provides localized resource strings for each currently supported language by Ignite UI. Both combined gives a unified and easy way of setting desired language or locale for the Ignite UI components globally and individually for each component.

## Setup

To setup the repo for local work run:

```
npm install
```

## Building

To build all packages run:

```
npm run build
```

To build just the core package run:

```
npm run build:core
```


To build just the resources package run:

```
npm run build:resources
```

## Lint

The repo follows coding guidelines, which are kept in check using lint. To run it locally run:

```
npm run lint
```


## Tests

The repo uses [Vitest](https://vitest.dev/guide/) for a base testing framework and [Playwright](https://vitest.dev/guide/browser/playwright.html) for in browser testing. Also the ability for out of browser testing is available using [jsdom](https://github.com/jsdom/jsdom). It is highly encouraged to use the native browser one, while the other can be used for easier debugging of tests and core functionality, but keep in might the nature of `jsdom` not being a native browser.

If you are using `VSCode`, I recommend to install the [Vitest extension](https://marketplace.visualstudio.com/items?itemName=vitest.explorer) as well, otherwise debugging using `Javscript Debug Console` does not work for me as expected and the source maps are not correct. Maybe its a config issue, but using the plugin is easier anyway for debugging.

To run the tests run:

```
npm run test
```

If you use Playwright for the first time it will throw an error. Just install the necessary dependencies using:

```
npx playwright install --with-deps --only-shell chromium
```

By default the tests run in `headless` mode using `Chromium`. If you would like to see it in the browser itself you need to set [headless](https://vitest.dev/guide/browser/config.html#browser-headless) option in the `vitest.browser.config.ts` file for the desired browser:

```
test: {
browser: {
headless: false
}
}
```

To run a specific test, set in the test source `only` option for a test in the following way:

```typescript
it('should test something', { only: true }, () => {
// Test code
})

```

The following way should also work (but not for me :s ):

```typescript
it.only('should test something', () => {
// Test code
})

```

## License
This is a commercial product, requiring a valid paid-for license for commercial use.
This product is free to use for non-commercial educational use for students in K through 12 grades or University programs, and for educators to use in a classroom setting as examples / tools in their curriculum.
In order for us to verify your eligibility for free usage, please [register for trial](https://Infragistics.com/Angular) and open a support ticket with a request for free license.

To acquire a license for commercial usage, please [register for trial](https://Infragistics.com/Angular) and refer to the purchasing options in the pricing section on the product page.

© Copyright 2020 INFRAGISTICS. All Rights Reserved.
The Infragistics Ultimate license & copyright applies to this distribution.
For information on that license, please go to our website [https://www.infragistics.com/legal/license](https://www.infragistics.com/legal/license).
Loading
Loading