Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Refactoring and improvements #52

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
db7f9be
Dutch translations
Jun 13, 2013
39e1165
Simplified the locale file format, and applied it to the English (en-…
Jun 13, 2013
4e2905e
kendo.hu-HU.js hungarian localization
janez89 Jun 25, 2013
bb2959c
Fixing hard coded translation of Filter/Clear
DonKarlssonSan Jun 28, 2013
7063ff9
Fixing typos in readme.md
DonKarlssonSan Jun 28, 2013
fe3d691
credits for Hungarian translation
loudenvier Jul 2, 2013
85b94ad
Added Lang fr-FR, nl-BE
jvanderbiest Jul 3, 2013
d249d8f
Create kendo.fr-CA.js
Jul 5, 2013
2c6beae
Credits to Martin for French Canadian
loudenvier Jul 8, 2013
94d56db
credits for fr-FR and nl-BE to jvanderbiest
loudenvier Jul 8, 2013
6acc0b1
Arabic Translations
urbanknight Jul 18, 2013
bafc561
Update kendo.ar-JO.js
urbanknight Jul 25, 2013
e881bd6
Update kendo.fa-IR.js
salarcode Aug 2, 2013
6ed7f57
Create kendo.es_PA.js
bmunoz26 Sep 3, 2013
a6adb27
Correction misspelling - kendo.pt-BR.js
Sep 10, 2013
7da8196
Update kendo.ru-RU.js
Pyatakov Sep 27, 2013
7d89141
Spain's Spanish translation.
i0i0 Oct 1, 2013
ef0dddf
Added script file for Romanian language.
ion-sapoval Oct 6, 2013
c55df44
credits
loudenvier Oct 8, 2013
da5b9d7
Corrected a couple of typos
linnet Nov 6, 2013
7d9d236
credits
loudenvier Nov 6, 2013
4884c77
Create kendo.sk-SK.js
Nov 14, 2013
b92cd0e
normalized filenames per tea2code suggestion
loudenvier Dec 13, 2013
65d35a8
update pt-BR sample to use 2013.2.716 for testing purposes
loudenvier Dec 13, 2013
de5249f
credits for sk-SK
loudenvier Dec 13, 2013
0cac9a4
Update es-ES and es-MX with 2013 Q3 changes
joebordes Dec 28, 2013
00f1326
Create Kendo.GB.js
Simba-Mupfunya Jan 7, 2014
2e75f05
Revert "Create Kendo.GB.js"
Simba-Mupfunya Jan 7, 2014
48f7408
Create Kendo.GB.js
Simba-Mupfunya Jan 7, 2014
2d8d844
Updated to kendo version v2013.3.1316
notjulian Jan 24, 2014
3a8ca4b
update es-ES, es-MX and es-EC to v2013.3.1316
joebordes Jan 24, 2014
a5e6619
credits
loudenvier Jan 25, 2014
b1d91f5
Added script for Croatian hr-HR
nixa333 Jan 27, 2014
299f8cc
credits
loudenvier Jan 27, 2014
6645e3b
Refactoring and improvements
Jan 31, 2014
3dc35c1
Refactoring and improvements
Jan 31, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 3 additions & 108 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,108 +1,3 @@
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
[Bb]in/
[Oo]bj/

# mstest test results
TestResults

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results
[Dd]ebug/
[Rr]elease/
x64/
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.log
*.vspscc
*.vssscc
.builds

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*

# NCrunch
*.ncrunch*
.*crunch*.local.xml

# Installshield output folder
[Ee]xpress

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish

# Publish Web Output
*.Publish.xml

# NuGet Packages Directory
packages

# Windows Azure Build Output
csx
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
[Bb]in
[Oo]bj
sql
TestResults
[Tt]est[Rr]esult*
*.Cache
ClientBin
[Ss]tyle[Cc]op.*
~$*
*.dbmdl
Generated_Code #added for RIA/Silverlight projects

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
.idea
node_modules
bower_components
155 changes: 55 additions & 100 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
Kendo Global
============

# Kendo Global
Complements Telerik's Kendo UI with language packs for the localization of all
Kendo UI widgets. It works with both open source and commercial versions of Kendo UI.

Kendo UI
========

## Why
Kendo UI is a fantastic HTML 5 framework and component suite for developing
cross-browser/device applications. It's based on the JavaScript language and has
helpers for ASP.NET MVC to make the life easier for .NET developers used to the
Expand All @@ -18,118 +14,77 @@ in plain, good, old English.

Enter Kendo Global...

How
===

Simply add a reference to the desired language file after including the Kendo UI
JavaScript files and all widgets will assume that file's language. Something
like this:

<script src="http://cdn.kendostatic.com/2012.3.1114/js/kendo.all.min.js"></script>
<script src="\js\lang\kendo.ptBR.js"></script>

**Note**: The JS files are encoded in UTF-8 so your page should also be enconded
in a compatible charset or else the special characters will look as garbage.
The demos set the correct charset as shown bellow:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
...

Why
===

Kendo UI widgets use "enclosured" options inside the source code to define the
many text messages and labels that will be used to render their parts. These
options aren't available in the global context for easy overriding. These options
can be passed on a per-widget manner to change the texts used for that specific
widget. This soon becomes cumbersome as every and each widget will require
a whole set of textual options to show them in a specific language (not to
mention when you have to show them in multiple languages!) as shown bellow:

filterable: {
messages: {
info: "Título:",
filter: "Filtrar",
clear: "Limpar",
isTrue: "é verdadeiro",
isFalse: "é falso",
and: "E",
or: "Ou"
},
operators: {
string: {
eq: "Igual a",
neq: "Diferente de",
startswith: "Começa com",
contains: "Contém",
endswith: "Termina em"
},
number: {
eq: "Igual a",
neq: "Diferente de",
gte: "Maior que ou igual a",
gt: "Mair que",
lte: "Menor que ou igual a",
lt: "Menor que"
},
date: {
eq: "Igual a",
neq: "Diferente de",
gte: "Maior que ou igual a",
gt: "Mair que",
lte: "Menor que ou igual a",
lt: "Menor que"
}
}
},
groupable: {
messages: {
empty: "Arraste colunas aqui para agrupar pelas mesmas"
}
...

The solution employed by Kendo Global is to capitalize on JavaScript nature and
override these options at the prototype level, without breaking any
functionality and still allowing individual overrides for specific messages or
labels with the standard mechanism of passing individual options.

Contributions are welcome
=========================

Currently there are 14 language packs (and growing). I'll accept any and
## Installation
1. `bower install kendo-global --save`
2. Add a script reference after the Kendo UI JavaScript files.
``` html
<!DOCTYPE html>
<html>
<head>
<!-- Important otherwise special characters won't work -->
<meta charset="utf-8">

<!-- First include KendoUI -->
<script src="http://cdn.kendostatic.com/2012.3.1114/js/kendo.all.min.js"></script>

<!-- Then include the language file you want -->
<script src="lang/js/kendo-pt-PT.js"></script>
</head>
</html>
```

## Building
This repository uses [Gulp](https://github.com/gulpjs/gulp/) for building the `js` files and `demo` files.
To build these yourself, follow the following steps.

1. Make sure you have [NodeJS](http://nodejs.org/download/) installed.
2. `npm install` at the root of the repository.
3. `gulp build`

## Contributing
Currently there are 17 language packs (and growing). I'll accept any and
all pull requests for corrections and new languages (and also email submissions)

Translating a language file is a trivial (but tedious) process. The file format
is self-explanatory (but don't change anything outside comments and string
values as the file is a JavaScript executable file and will likely broke if
changes are made to its "code part").
Follow the following steps.

1. Go to the `lang/json` folder and copy an existing language file, and give it the right name,
of the format `kendo-<languagecode-COUNTRYCODE>.json`
2. Translate all the values.
3. Commit and create a pull request.

To get started just open any of the files and save a copy of it named after the
desired language's 2 or 4 character code and start translating it!

Full credits to each and everyone that contributes will be given individually
bellow!

Credits
=======

## Credits
| Language | Name | Author |
| -------- | -------------------------- | --------------------------------------------------------- |
| ar-JO | Arabic | Wael Mahameed |
| da-DK | Standard Danish | Klaus Nielsen |
| de-DE | Standard German | Claudio Mertz |
| en-GB | British English | Simba-Mupfunya |
| es-EC | Ecuadorian Spanish | Andrés Checa |
| es-MX | Mexican Spanish | Salvador Parra |
| es-ES | Spanish Standard | i0i0,Joe Bordes(JPL TSolucio) |
| es-MX | Mexican Spanish | Salvador Parra,Joe Bordes(JPL TSolucio) |
| es-PA | Panamanian Spanish | Bolívar Muñoz |
| fa-IR | Persian/Farsi (Iran) | Bahman Nikkhahan |
| fr-CA | French (Canadian) | Martin Auclair |
| fr-FR | French Standard | Jonas Van der Biest |
| hr-HR | Croatian | nixa333 |
| hu-HU | Hungarian | Janos Meszaros (Janez) |
| it-IT | Italian | Paolo Ascari |
| nb-NO | Standard Norwegian | Mikael Gyth |
| nl-BE | Dutch (Belgium) | Jonas Van der Biest |
| nl-NL | Dutch Standard | Mark Lagendijk |
| pl-PL | Polski Poland (pl-PL) | Miroslaw Szajner |
| pt-BR | Brazilian Portuguese | [Felipe Rocha Machado](http://feliperochamachado.com.br) |
| pt-PT | Portuguese (Portugal) | Pedro Carvalho |
| ru-RU | Standard Russian | Pavel Tsarenko |
| sv-SE | Svenska | Johan Karlsson |
| sk-SK | Slovak | majsterka |
| sv-SE | Swedish | Johan Karlsson |
| tr-TR | Standard Turkish | burdem |
| zh-CN | Simplified Chinese | IKKI Phoenix (Fenikkusu no Ikki :-) |


## Contributors
The following people contributed with corrections, updates and suggestions:
Alexander Pyatakov, Thiago H. Oliveira, DonKarlssonSan, Jesper Kamstrup Linnet, Mark Lagendijk.
30 changes: 30 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "kendo-global",
"version": "1.1.0",
"homepage": "https://github.com/loudenvier/kendo-global",
"authors": [
"Felipe Machado"
],
"description": "Language packs for Telerik's Kendo UI (open source and commercial version)",
"keywords": [
"kendo",
"kendo-ui",
"localization",
"translation",
"language",
"globalization",
"locale",
"global"
],
"license": "Public Domain",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"jQuery": ">= 1.6.0"
}
}
2 changes: 1 addition & 1 deletion demo/kendo_global.en-US.html → demo/kendo-ar-JO.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<!--
! ALL THAT IS NEEDED IS TO INCLUDE THE DESIRED LANGUAGE FILE
!-->
<script src="..\lang\kendo.en-US.js"></script>
<script src="../lang/js/kendo-ar-JO.js"></script>

<link href="http://cdn.kendostatic.com/2012.3.1114/styles/kendo.common.min.css" rel="stylesheet" />
<link href="http://cdn.kendostatic.com/2012.3.1114/styles/kendo.rtl.min.css" rel="stylesheet" />
Expand Down
6 changes: 3 additions & 3 deletions demo/kendo_global.sv-SE.html → demo/kendo-da-DK.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<!--
! ALL THAT IS NEEDED IS TO INCLUDE THE DESIRED LANGUAGE FILE
!-->
<script src="..\lang\kendo.sv-SE.js"></script>
<script src="../lang/js/kendo-da-DK.js"></script>

<link href="http://cdn.kendostatic.com/2012.3.1114/styles/kendo.common.min.css" rel="stylesheet" />
<link href="http://cdn.kendostatic.com/2012.3.1114/styles/kendo.rtl.min.css" rel="stylesheet" />
Expand All @@ -33,7 +33,7 @@ <h1>Grid demo</h1>
<!-- EDITOR DEMO -->
<div class="k-content" style="width:692px; margin:0 auto;">
<br /><h1>Editor demo</h1>
<textarea id="editor" rows="10" cols="30" style="width:740px;height:440px">
<textarea id="editor" rows="10" cols="30" style="width:740px;height:440px">
&lt;p&gt;&lt;img src=&quot;http://www.kendoui.com/Image/kendo-logo.png&quot; alt=&quot;Editor for ASP.NET MVC logo&quot; style=&quot;display:block;margin-left:auto;margin-right:auto;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;
Kendo UI Editor allows your users to edit HTML in a familiar, user-friendly way.&lt;br /&gt;
Expand Down Expand Up @@ -251,4 +251,4 @@ <h3>Book Tickets</h3>


</body>
</html>
</html>
8 changes: 2 additions & 6 deletions demo/kendo_global.it-IT.html → demo/kendo-de-DE.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<!--
! ALL THAT IS NEEDED IS TO INCLUDE THE DESIRED LANGUAGE FILE
!-->
<script src="..\lang\kendo.it-IT.js"></script>
<script src="../lang/js/kendo-de-DE.js"></script>

<link href="http://cdn.kendostatic.com/2012.3.1114/styles/kendo.common.min.css" rel="stylesheet" />
<link href="http://cdn.kendostatic.com/2012.3.1114/styles/kendo.rtl.min.css" rel="stylesheet" />
Expand Down Expand Up @@ -184,11 +184,7 @@ <h3>Book Tickets</h3>
data: createRandomData(50),
pageSize: 10
},
filterable: {
messages: {
clear: "Cancelar"
}
},
filterable: true,
columnMenu: true,
groupable: true,
sortable: true,
Expand Down
Loading