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

add table for French transliteration #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ignore build config file
_build/build.config.php
.DS_Store
2 changes: 0 additions & 2 deletions _build/.gitignore

This file was deleted.

4 changes: 3 additions & 1 deletion _build/build.transport.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/* define package */
define('PKG_NAME','translit');
define('PKG_NAME_LOWER',strtolower(PKG_NAME));
define('PKG_VERSION','1.0.0');
define('PKG_VERSION','1.1.1');
define('PKG_RELEASE','beta');

/* define sources */
Expand All @@ -37,6 +37,7 @@
/* load builder */
$modx->loadClass('transport.modPackageBuilder', '', false, true);
$builder = new modPackageBuilder($modx);
$builder->directory = dirname(dirname(__FILE__)).'/_packages/';
$builder->createPackage(PKG_NAME, PKG_VERSION, PKG_RELEASE);
$builder->registerNamespace('translit', false, true, '{core_path}components/'.PKG_NAME_LOWER.'/');

Expand All @@ -57,6 +58,7 @@

/* now pack in the license file, readme and setup options */
$builder->setPackageAttributes(array(
'changelog' => file_get_contents($sources['docs'] . 'changelog.txt'),
'license' => file_get_contents($sources['docs'] . 'license.txt'),
'readme' => file_get_contents($sources['docs'] . 'readme.txt'),
));
Expand Down
Binary file added _packages/translit-1.1.1-beta.transport.zip
Binary file not shown.
8 changes: 8 additions & 0 deletions core/components/translit/docs/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
Changelog for translit.

translit 1.1.1-beta (January 24, 2013)
====================================
- Tweaked the French table

translit 1.1.0-beta (January 24, 2013)
====================================
- Add table for French.

translit 1.0.0-beta (October 20, 2010)
====================================
- Initial beta release.
4 changes: 2 additions & 2 deletions core/components/translit/docs/readme.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
--------------------
Extension: translit
--------------------
Version: 1.0.0-beta
Released: October 20, 2010
Version: 1.1.1-beta
Released: January 24, 2013
Since: October 20, 2010
Author: Jason Coward <[email protected]>

Expand Down
70 changes: 70 additions & 0 deletions core/components/translit/model/modx/translit/tables/french.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?php
/**
* Common transliteration table
*/
return array (

// additions to noaccents
'«'=>'','»'=>'',
'"'=>'','“'=>'','”'=>'',
'‘'=>'-',
'…'=>'-',

// modified from no accents
'\''=>'-',

// localized no accents
'&'=>'et','%'=>'',
'À'=>'A','Á'=>'A','Â'=>'A','Ã'=>'A','Ä'=>'A','Å'=>'A','Æ'=>'E','Ā'=>'A','Ą'=>'A','Ă'=>'A',
'Ç'=>'C','Ć'=>'C','Č'=>'C','Ĉ'=>'C','Ċ'=>'C',
'Ď'=>'D','Đ'=>'D',
'È'=>'E','É'=>'E','Ê'=>'E','Ë'=>'E','Ē'=>'E','Ę'=>'E','Ě'=>'E','Ĕ'=>'E','Ė'=>'E',
'Ĝ'=>'G','Ğ'=>'G','Ġ'=>'G','Ģ'=>'G',
'Ĥ'=>'H','Ħ'=>'H',
'Ì'=>'I','Í'=>'I','Î'=>'I','Ï'=>'I','Ī'=>'I','Ĩ'=>'I','Ĭ'=>'I','Į'=>'I','İ'=>'I',
'IJ'=>'J','Ĵ'=>'J',
'Ķ'=>'K',
'Ľ'=>'L','Ĺ'=>'L','Ļ'=>'L','Ŀ'=>'L',
'Ñ'=>'N','Ń'=>'N','Ň'=>'N','Ņ'=>'N','Ŋ'=>'N',
'Ò'=>'O','Ó'=>'O','Ô'=>'O','Õ'=>'O','Ö'=>'O','Ø'=>'O','Ō'=>'O','Ő'=>'O','Ŏ'=>'O',
'Œ'=>'E',
'Ŕ'=>'R','Ř'=>'R','Ŗ'=>'R',
'Ś'=>'S','Ş'=>'S','Ŝ'=>'S','Ș'=>'S',
'Ť'=>'T','Ţ'=>'T','Ŧ'=>'T','Ț'=>'T',
'Ù'=>'U','Ú'=>'U','Û'=>'U','Ü'=>'U','Ū'=>'U','Ů'=>'U','Ű'=>'U','Ŭ'=>'U','Ũ'=>'U','Ų'=>'U',
'Ŵ'=>'W',
'Ŷ'=>'Y','Ÿ'=>'Y',
'Ź'=>'Z','Ż'=>'Z',
'à'=>'a','á'=>'a','â'=>'a','ã'=>'a','ä'=>'a','å'=>'a','æ'=>'e','ā'=>'a','ą'=>'a','ă'=>'a',
'ç'=>'c','ć'=>'c','č'=>'c','ĉ'=>'c','ċ'=>'c',
'ď'=>'d','đ'=>'d',
'è'=>'e','é'=>'e','ê'=>'e','ë'=>'e','ē'=>'e','ę'=>'e','ě'=>'e','ĕ'=>'e','ė'=>'e',
'ƒ'=>'f',
'ĝ'=>'g','ğ'=>'g','ġ'=>'g','ģ'=>'g',
'ĥ'=>'h','ħ'=>'h',
'ì'=>'i','í'=>'i','î'=>'i','ï'=>'i','ī'=>'i','ĩ'=>'i','ĭ'=>'i','į'=>'i','ı'=>'i',
'ij'=>'j','ĵ'=>'j',
'ķ'=>'k','ĸ'=>'k',
'ł'=>'l','ľ'=>'l','ĺ'=>'l','ļ'=>'l','ŀ'=>'l',
'ñ'=>'n','ń'=>'n','ň'=>'n','ņ'=>'n','ʼn'=>'n','ŋ'=>'n',
'ò'=>'o','ó'=>'o','ô'=>'o','õ'=>'o','ö'=>'o','ø'=>'o','ō'=>'o','ŏ'=>'o',
'œ'=>'e',
'ŕ'=>'r','ř'=>'r','ŗ'=>'r',
'ù'=>'u','ú'=>'u','û'=>'u','ü'=>'u','ū'=>'u','ů'=>'u','ű'=>'u','ŭ'=>'u','ũ'=>'u','ų'=>'u',
'ŵ'=>'w',
'ÿ'=>'y','ŷ'=>'y',
'ż'=>'z','ź'=>'z',
'ß'=>'s','ſ'=>'s',
'Α'=>'A','Ά'=>'A','Β'=>'B','Γ'=>'G','Δ'=>'D','Ε'=>'E','Έ'=>'E','Ζ'=>'Z','Η'=>'I','Ή'=>'I',
'Θ'=>'TH','Ι'=>'I','Ί'=>'I','Ϊ'=>'I','Κ'=>'K','Λ'=>'L','Μ'=>'M','Ν'=>'N','Ξ'=>'KS','Ο'=>'O',
'Ό'=>'O','Π'=>'P','Ρ'=>'R','Σ'=>'S','Τ'=>'T','Υ'=>'Y','Ύ'=>'Y','Ϋ'=>'Y','Φ'=>'F','Χ'=>'X',
'Ψ'=>'PS','Ω'=>'O','Ώ'=>'O','α'=>'a','ά'=>'a','β'=>'b','γ'=>'g','δ'=>'d','ε'=>'e','έ'=>'e',
'ζ'=>'z','η'=>'i','ή'=>'i','θ'=>'th','ι'=>'i','ί'=>'i','ϊ'=>'i','ΐ'=>'i','κ'=>'k','λ'=>'l',
'μ'=>'m','ν'=>'n','ξ'=>'ks','ο'=>'o','ό'=>'o','π'=>'p','ρ'=>'r','σ'=>'s','τ'=>'t','υ'=>'y',
'ύ'=>'y','ϋ'=>'y','ΰ'=>'y','φ'=>'f','χ'=>'x','ψ'=>'ps','ω'=>'o','ώ'=>'o',

// added by Martin Frano

'š'=>'s', 'ž'=>'z', 'ý'=>'y', 'ô'=>'o', 'ť'=>'t',
'Š'=>'S', 'Ž'=>'Z', 'Ý'=>'Y', 'Ô'=>'O'
);