Commit Graph

602 Commits

Author SHA1 Message Date
Santhosh Thottingal
644f38d5f3 Add Polish also to OpenDyslexic font supported languages
Bug: 57136
Change-Id: Ide4379c01ec1666cc837e0418c1481e3ae599441
2013-11-16 18:15:54 +05:30
Santhosh Thottingal
be99ff9a55 Fix bug: Cannot apply changes after switching panels back and forth
Bug: 57011
Change-Id: I0614d97dea99781f46bb80a496b12c95aef55c8c
2013-11-14 14:12:59 +00:00
Santhosh Thottingal
6f113bdf19 Keep previous input settings if new language selected and cancelled
Bug: 56913
Change-Id: If25c0cc07ae233085d1b270f9a75a0002ffe1882
2013-11-13 12:44:58 +00:00
Santhosh Thottingal
a1b8316ecc Remove the non-existing lazyload option for uls plugin
Change-Id: I1fac753c449b47de97eec244a8a53dbb8e77fc38
2013-11-13 12:43:38 +00:00
jenkins-bot
fb2c99d30e Merge "Validate the dirty flag before saving preferences in each modules" 2013-11-13 12:40:48 +00:00
Santhosh Thottingal
8b3d27a505 Validate the dirty flag before saving preferences in each modules
Pressing apply button is applicable to all settings module, not only
for the one that is visible. Unless we do a validation before we save
preferences, other module can cause incorrect (old) preferences to be
saved.

Bug: 56885
Change-Id: I31df2ee0bf8b600a94e8fed1a784daf529186b16
2013-11-13 12:39:57 +00:00
jenkins-bot
d19dc4fdc1 Merge "Use data-i18n for system font l10n" 2013-11-13 09:32:48 +00:00
Niklas Laxström
de4f78a6be Use data-i18n for system font l10n
This ensures that the translation is updated properly in the
language live preview.

Bug: 56888
Change-Id: I320c570f9272e8d191144f66a9cf0079c89d201d
2013-11-13 08:36:47 +00:00
jenkins-bot
f677fa2ff5 Merge "Page scrolls when opening language selector" 2013-11-13 04:43:39 +00:00
Niklas Laxström
7822d5d03b Page scrolls when opening language selector
Was happening mostly on Firefox when ULS was in personal
position and you were logged out and allowed to change language.

Loading grid here already prevents graphical glitch and delaying
the click seems to prevent scrolling to wrong position.

Bug: 56937
Change-Id: Ie9acaa5a46fd903221d30c94dbc26a83355cdb64
2013-11-12 12:50:31 +00:00
jenkins-bot
4c6229e9ba Merge "Revert "Do not load jquery.jStorage for logged in users"" 2013-11-12 12:48:51 +00:00
Nikerabbit
2bc77f2c18 Revert "Do not load jquery.jStorage for logged in users"
This reverts commit 5884337c9f.

Change-Id: Icfdfd89059a417a6aaea30d12164e7174dd5f58b
2013-11-12 12:47:56 +00:00
Kartik Mistry
aef4909616 Update Autonym font (20131112)
* Fix rendering of Telugu.

Bug: 56841
Change-Id: Ia43e404ed67346b65e9344c4fb7ae655ed303558
2013-11-12 16:30:26 +05:30
jenkins-bot
601ff3bc60 Merge "Do not load jquery.jStorage for logged in users" 2013-11-12 10:43:57 +00:00
Niklas Laxström
5884337c9f Do not load jquery.jStorage for logged in users
Change-Id: Ibe77962cecd6aa8504aa60d5d2b8d17a56e1319f
2013-11-12 10:40:59 +00:00
Amir E. Aharoni
bb250efea1 Cleanup wgULSLanguages usage
Change-Id: I15cb10f97ed39b18fdfb1bc2ce51d02374fe9c43
2013-11-11 18:14:55 +02:00
Amir E. Aharoni
97c79ec668 Fix incorrect module name
Follow up to Ic33ef034c794a523b5403867196c6098a58eb5b1.

Change-Id: I15c9e58b24bf4f43ac58f065ed42614df59e638f
2013-11-11 12:39:20 +02:00
Amir E. Aharoni
b23f937cb7 Remove the dependency on uls.data
Change-Id: I9fa103ee7d338ed8ea2032c82249a47d022d2c90
2013-11-11 09:56:55 +00:00
Santhosh Thottingal
f5ce066c80 Lazyload jquery.uls library
In the "interlanguage" position ULS is shown after 2 clicks,
so don't load it initially.

In the "personal" position ULS is shown immediately after
the language icon click, so load it, but conditionally.

The new RL module ext.uls.mediawiki is added for setting
jquery.uls defaults in a way that will lazy-load the language names.

Change-Id: Ic33ef034c794a523b5403867196c6098a58eb5b1
2013-11-11 14:13:02 +05:30
Santhosh Thottingal
9dd4072d3d Avoid a js error when inputsettings are saved.
It happens when input settings are accessed directly while display
settings are not initialized. While saving the display settings
will not be rendered, causing a js error

Change-Id: I3ef1afe67a6bcdc3047b482d697bc03baab6ac47
2013-11-07 13:58:06 +00:00
Santhosh Thottingal
7e787c0fc5 Avoid bigger fonts being default for languages
* Avoided Amiri being default font for ar
* Avoided CharisSIL, DuolosSIL being default fonts for
cdo, nan respectively

The change is because of the bandwidth efficiency concerns. Also
Arabic being widely supported language, having defaut font is not
must.

Change-Id: I657d08ded26f25342d18483f6c5a0393f625001b
2013-11-07 12:22:51 +00:00
Santhosh Thottingal
dfc40c8f59 Refactor the css for interlanguage links and autonym class
Move it to a seperate css file ext.uls.webfonts.css so that the RL
modules are more granular and clear.

Also get the @font-face css for Autonym font get ready on page load
so that the font applied automatically to any future elements on page.

Change-Id: Icb76df5baedaba8ab613d665a1be923779a6b9e7
2013-11-06 20:51:26 +05:30
jenkins-bot
a049e25962 Merge "Refactor ime lazy loading" 2013-11-06 04:46:57 +00:00
Niklas Laxström
193f69b017 Refactor ime lazy loading
* Do not load anything unless input field is focused
* Split the setup function to smaller functions
* Introduce $wgULSImeSelectors to allow configuration and avoid
  duplication of selectors in two places.

Change-Id: If5a476e66681dde9f0b72f619d35ddf6255246ac
2013-11-05 16:48:47 +05:30
Santhosh Thottingal
27f356d1f6 Add autonym class to the buttons displaying language
Change-Id: Iade66179acd46835099e015d73c01349526f80ec
2013-11-05 15:00:12 +05:30
jenkins-bot
d74e35cf61 Merge "Update Autonym font to latest version(20131104)" 2013-11-04 15:37:10 +00:00
Santhosh Thottingal
76e82e4a9c ResourceLoader Module for serving json based localization messages
ApiULSLocalization is still present since we have to provide live
language preview feature.

Moved the loading of json file to includes/JsonMessageLoader.php

Also moved all RL modules to includes folder.

Bug: 56509
Change-Id: Ic39dec1c484982fb07edd167e83794c0b5f470ee
2013-11-04 14:59:14 +00:00
Santhosh Thottingal
1f42e3a982 Update Autonym font to latest version(20131104)
Release: https://github.com/santhoshtr/AutonymFont/releases/tag/20131104
Changes:
* Remove Tamil GSUB rules, use GPOS alone
* Autohint Latin glyphs
* Dont strip hints for eot format
* Glyph simplifications and misc cleanup

Bug: 56552
Bug: 56346

Change-Id: Ib2014e0606983dbf33391e479f96c75fab79075f
2013-11-04 20:28:06 +05:30
jenkins-bot
f373659150 Merge "Cleanup comments and whitespace" 2013-11-01 17:23:16 +00:00
Amir E. Aharoni
25a95bc760 Cleanup comments and whitespace
Change-Id: I7597c590a59ada855d759615fbb1675c3bcfe461
2013-11-01 15:53:20 +02:00
Kartik Mistry
15b9226f07 Unify font license abbreviations.
1. Updated license abbreviations in font.ini
2. Removed duplicate license file in Suwannaphum
3. Corrected license for some fonts
4. Added licenses/LICENSES file to note license related issues and
abbreviations

Bug: 53281
Change-Id: Ia3aa6396cf5197c6baaff716d27682dd23b7674e
2013-11-01 18:19:13 +05:30
Santhosh Thottingal
65d1b3e27f Use Autonym font in webfonts repository
This was served from jquery.uls. But jquery.uls does not contain
the font now, but only provides and example usage with Autonym font

This also make sure consistency in font serving in terms of URLs,
caching etc.

Change-Id: I48b0cc4a19c3ddd8d00f585faf31046d8ba6bf9c
2013-11-01 12:39:42 +02:00
Kartik Mistry
2235ec33d4 Update MiriamCLM font.
Update to version 0.130
Upstream: http://culmus.sourceforge.net/

Change-Id: If406670936497d678cc0cd278e5f9e0253e18d92
2013-11-01 10:04:46 +05:30
Reedy
0442540318 Add BoldItalic OpenDyslexic fonts
Change-Id: I8a0ca946c05f3173bb051d26f0d8936bee484407
2013-10-29 16:04:01 +00:00
Kartik Mistry
fa0f36905c Add Batak font (no default).
Bug: 54528
Change-Id: I7af564aee8897f0d935c74867a3b404078016a7a
2013-10-29 16:29:45 +02:00
Reedy
e3a34c2bd0 Rename OpenDyslexic fonts to reduce maintenance burden
(When updating from upstream git repo, names are now the same)

Change-Id: Ic15a4544d75be50fd8a8f3dfc59a4ae301184b27
2013-10-29 13:45:45 +00:00
Amir E. Aharoni
8cf9b6882e Adding Hanuman, Nokora and Suwannaphum fonts for Khmer
Not making it default for now, to allow more testing by the community.
Other KhmerOS fonts are removed as per community request.

See: https://bugzilla.wikimedia.org/show_bug.cgi?id=53673#c9

Bug: 53673
Change-Id: I4e01dd19d1e8a4e10b6ba150ea912c6f352e6cbe
2013-10-29 09:18:21 +05:30
Santhosh Thottingal
6a08a6d216 Update Meera font from upstream
Version: 6.0
Upstream: https://savannah.nongnu.org/projects/smc

Change-Id: If3638c7662e8ae3ca055504c9b7189335af51e92
2013-10-18 15:19:11 +05:30
jenkins-bot
f2701cb353 Merge "Make base font repository path configurable via $wgULSFontRepositoryBasePath" 2013-10-17 16:04:02 +00:00
Santhosh Thottingal
c593ecef4c Support languages written in Tibetan script
Languages listed in
https://en.wikipedia.org/wiki/Category:Languages_written_in_Tibetan_script
mapped to Jomolhari font

See https://www.mediawiki.org/wiki/Talk:Universal_Language_Selector#Several_problems_with_web_fonts_31516
and https://github.com/wikimedia/jquery.webfonts/issues/29

Change-Id: I873dfb8c3689470a6070f90088984a668a3faf51
2013-10-17 17:19:54 +05:30
Santhosh Thottingal
ba57ebc9ae Use AbyssinicaSIL for Ge'ez and Tigre languages
See https://www.mediawiki.org/wiki/Talk:Universal_Language_Selector#Several_problems_with_web_fonts_31516
and https://github.com/wikimedia/jquery.webfonts/issues/29

Change-Id: I7a2853682f0a103e2ce7e459d2bd3097a21001ed
2013-10-17 16:24:06 +05:30
Ori Livneh
03e40f7215 Make base font repository path configurable via $wgULSFontRepositoryBasePath
This patch adds a configuration variable, '$wgULSFontRepositoryBasePath', which
specifies the base path to the font repository. By default, the variable is set
to its existing value, which is $wgExtensionAssetsPath +
'/UniversalLanguageSelector/data/fontrepo/fonts/'. However, adding a discrete
configuration variable makes it possible to configure ULS to use a custom URL
scheme that is more suitable for large static assets that change infrequently.

Change-Id: Idbe57072c4f3258757eb691e54cab5429cadcfda
2013-10-17 00:10:00 -07:00
Siebrand Mazeland
315cf739bc Update formatting
Change-Id: Iaee2ab4f36d3a0dce143c62965ab29de504b31ea
2013-10-09 15:40:39 +02:00
Santhosh Thottingal
b4f794f9fe Reset language and font while preview
If not reset, the font-family will persist for languages
without font preferences

Steps to reproduce:
1. Open language settings->Display settings.
Switch language to English. Inspect the lang and font-family
of uls-display-settings element.

2. Switch language to hi. Inspect the lang and font-family
of uls-display-settings element. You can see Lohit Devanagari
as font.

3. Switch the language back to English. You can still see font
as Lohit Devanagari. With this patch, you should see font family
reset for English.

Change-Id: Ib3346d8b888c7dcfda16e8a10473c785a1ebd890
2013-09-30 10:59:55 +05:30
Santhosh Thottingal
32bb03045f Refactor all language, font change code to preview method
Avoids duplication of code and better organising language and font
change logic

Change-Id: I4e95cfc2de7b650a75e2bd550af547647d5b3eb3
2013-09-30 04:14:46 +00:00
Roan Kattouw
d6ae72eb9c Don't trigger namespaced events, it breaks VisualEditor
Code like $input.trigger( 'focus.ime' ); doesn't make any sense. Event
namespaces exist for binding and unbinding and are irrelevant when
triggering. However, there's a bug in the version of jQuery that we
use (1.8.3) that causes .trigger( 'focus.ime' ) to perform a native
focus and call natively bound focus handlers, but only call jQuery
event handlers bound to 'focus.ime', not handlers bound to 'focus'.
This bug is fixed in jQuery 1.9+. http://jsfiddle.net/WGy9h/3/
demonstrates this bug.

The way ULS broke VE with this went like this:
* VE initializes and creates two contentEditable divs, the
  pasteTarget and the documentNode. It then focuses the documentNode.
* ULS loads jQuery.ime
* Once jQuery.ime loads, it first calls .trigger( 'focus.ime' ) on
  the pasteTarget
* jQuery focuses the pasteTarget, which means a blur is emitted on the
  documentNode
* In response to this blur event, VE disables the SurfaceObserver
* jQuery.ime then calls .trigger( 'focus.ime' ) on the documentNode
* jQuery focuses the documentNode, but does not call VE's focus handler
  because it's bound to 'focus' rather than 'focus.ime'
* This means VE's SurfaceObserver is not reenabled
* If the user then focuses something else then focuses VE again, a
  native focus event fires and the SurfaceObserver does get reenabled

Change-Id: I7c590599df4cf62418403bc1d1dccfc3c6db5fd3
2013-09-27 16:34:19 -07:00
Kartik Mistry
039c91d1d5 Integration tests for live preview of display language
Bug: 53255

Change-Id: I1506ddd0ef68217ac114bdf4c29c62cd071b1900
2013-09-26 22:51:37 -07:00
Santhosh Thottingal
2d8522d1ba Keep correct lang attribute when display settings closed
Bug: 54594
Change-Id: I15b12e17b5a922cce6717577bc0d56dfd80ccfee
2013-09-26 07:36:13 +00:00
Santhosh Thottingal
3fbbf05c26 Optionally exclude elements from applying webfonts
* Updates jquery.webfonts from upstream
* Introduces wgULSNoWebfontsSelectors configuration variable. It
  takes an array of jquery selector to which webfonts will not be
  applied if defined.

Change-Id: I0dc263f84620af4077f52e18eeb0f986ff0f13b9
2013-09-19 10:17:54 -07:00
Santhosh Thottingal
e0fa027b9f Fix typo in the fontname of Estrangelo Edessa
It was Estarngelo Edessa
Bug: 47229

Change-Id: I941c8c09bedcf58428f93231936f168f993cde8f
2013-09-11 18:09:22 -07:00