Commit Graph

420 Commits

Author SHA1 Message Date
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
Niklas Laxström
e36d9b1cc3 Regression: Using [...] to change language does not activate apply button
Bug: 53736
Change-Id: If52beb73f9f3f74cde63bd846974540682066ab6
2013-09-04 07:00:53 +00:00
Santhosh Thottingal
3af403fee5 Make the cancel and apply button applicable for all modules
If a user does changes in module A, does not save or cancel,
goes to module B, does some changes, moves to other modules,
and finally presses Apply, all changes should get saved.

Similarly, if a user cancels, all changes should get cancelled.

This required moving the cancel and apply button outside of modules
and managed by the language settings framework.

Modules get mw.uls.settings.apply or mw.uls.settings.cancel triggers
to do whatever they want to do on apply or save.

Includes some refactoring related to this.

Bug: 53256
Change-Id: I7d773d33a980a78604b36e39bf96a5686870124e
2013-09-02 17:03:13 +02:00
Niklas Laxström
34146ea023 (bug 49738) Use correct name for wiki content language
Happens when anonymous user cannot change language, and the
language of the translation differs from the content language.

Change-Id: Ie4f15f1813eec992cfe060baf9cd7dcb5f8a0d95
2013-08-30 12:45:02 +03:00
Nikerabbit
ef826e0e75 Simplify the cancel logic for input and display settings
Change-Id: I2afe78edad31b00a35d0589384e4091b61091275
2013-08-29 10:57:45 +00:00
Nikerabbit
537e6def5d Revert "Simplify the cancel logic for input and display settings"
This reverts commit a5d79594a3.

Causes new integration tests to fail.

Change-Id: I7e14d73d0d726a3253e8c6e6bdf5066230d8454c
2013-08-27 12:34:50 +00:00
Santhosh Thottingal
a5d79594a3 Simplify the cancel logic for input and display settings
Restore the language(ui, content), font values, input method values.

Rest of the UI resetting will be done by redrawing the settings
area whenever the language settings is accessed again.

Change-Id: Ia1488d1501f9c9f61726cea3637624f22a7ba135
2013-08-26 14:56:38 +00:00
Santhosh Thottingal
0d9bbd8113 Make the behavior of close button same as cancel button
Bug: 53255
Change-Id: If27a770c531d78538c70dd86199f1791b1171c2d
2013-08-26 14:31:09 +00:00
Amir E. Aharoni
a1ad38d715 Show an autonym for languages that don't have input methods
Bug: 51025
Change-Id: I4a6cc9a79f186941cc79533de90ab0fb7e104673
2013-08-26 13:31:27 +03:00
jenkins-bot
c59a1f0122 Merge "Make Phetsarath font default for Lao" 2013-08-26 06:04:08 +00:00
jenkins-bot
313ce86021 Merge "Pass an actual array to fontStack option to webfonts" 2013-08-26 05:57:47 +00:00
Kartik Mistry
a66be7dca8 Make Phetsarath font default for Lao
Bug: 52962

Change-Id: I5da0d2d3ca08f3eb3a09800e03e9d25ecdba0286
2013-08-26 11:20:33 +05:30
Santhosh Thottingal
c793a9bd31 Pass an actual array to fontStack option to webfonts
Change-Id: Id836d7ce82e22e7d0679a5c615be014b1fce08b3
2013-08-26 09:43:00 +05:30
Kartik Mistry
e0d63bce05 Make OskiEast font default for Canadian Syllabic
Change-Id: Ie928de294ec0dee5482fb93d4333ab5df9d1c843
2013-08-23 16:59:36 +05:30
jenkins-bot
ee70cf04c9 Merge "Use mw.hook for notifying cancel of settings window to modules" 2013-08-22 08:03:38 +00:00
Amir E. Aharoni
7330295ce2 Use the old way of checking browser support for MW < 1.22
Bug: 52322
Change-Id: I346c1119b2ae841b3dbb2e7b8a5a2d924269b150
2013-08-22 09:32:59 +03:00
Santhosh Thottingal
4704cf5182 Use mw.hook for notifying cancel of settings window to modules
This avoids mandate of having 'cancel' method defined in settings module.
Also avoids looping of all modules while cancel is happening.

Change-Id: I87d0975f2ef1bdee61f71d66eabe3040b81876b8
2013-08-22 11:51:26 +05:30
jenkins-bot
00e248e1f9 Merge "Provide mw.hook when not provided by older MediaWikis" 2013-08-22 04:17:09 +00:00
Niklas Laxström
ec518a03b4 Provide mw.hook when not provided by older MediaWikis
Change-Id: I8d0826722064551cc46be26215ffb954f39babb0
2013-08-22 09:46:07 +05:30
Ebrahim Byagowi
0ff6ab13cb Add Nazli as a serif font for Persian Script
It is the font used in book maker for Persian Wikipedia. Its font
family (Nazanin) is one of widely used font on Persian documents.
It is needed for print output of Persian Wikipedia articles

Change-Id: I2c658f599b5c05882673f42c29c80ae826ddc047
2013-08-21 16:56:15 +03:00
Amir E. Aharoni
628923c812 When applying settings, log ime-change only if needed
Change-Id: I62b4ce777948c18cec5117279523198f4514c3a6
2013-08-20 12:42:52 +03:00
Amir E. Aharoni
4e04182ecd Fire the ime-enable/disable hook upon saving the preferences
Change-Id: I98e502cd8dc1990b10b1f824614c84d3bf5b993f
2013-08-20 08:31:21 +00:00
jenkins-bot
6cf1486399 Merge "Log ime-change event" 2013-08-20 05:44:08 +00:00
Amir E. Aharoni
3b6d5cc83e Log ime-change event
Change-Id: I6dfc769f0de536e2ef35b165fe7a35f196bb181b
2013-08-20 08:34:52 +03:00
Amir E. Aharoni
a3bca89a42 Implement language-selection-method event
Change-Id: If2d207f8a221c8f2a560b1399ad69a3032b2064b
2013-08-20 05:16:35 +00:00
Kartik Mistry
e5891b83b5 Add a Lao web font
Bug: 52962
Change-Id: Ia8cf7fa8c8f2832da35af52899b4a7c5bc05e5d3
2013-08-19 23:49:06 +03:00
Kartik Mistry
f244ef66d1 Add a Sinhala web font
Bug: 52964
Change-Id: I04a05c01c079ac6a4b109fe0c4a6c36c7732fcae
2013-08-19 23:30:43 +05:30
Amir E. Aharoni
0f34b4d934 Fixing "Common language" functionality
If was broken in
Icda498f676d1d3ddaefad75fd9212150f6966666

Bug: 53035
Change-Id: Ida29364073b07b985050565cacc6634c134f8d6c
2013-08-19 16:34:43 +03:00
Santhosh Thottingal
7649b47f5c Followup I59dfcfb25c, language change work with out event logging
In I59dfcfb25c, for logging events when page is navigating away, we
used callbacks with mw.hook. That is wrong approach. If event logging
is disabled those callbacks will never called: it broke language change
and all use cases which navigates away from current page.

Event logging should not interfere with any ULS functionality. If ULS
functionality depends on callbacks from event logging, it is wrong.

In this patch, we give a small time window to make sure event logging is
fired, but we won't wait for its success or failure.

If eventlogging is disabled, this time window does not exist.

Change-Id: I0b7d9d8b9d1d01b99422010596ebfa80b2589d04
2013-08-19 10:13:56 +00:00
Niklas Laxström
1f66cb22bc Log no-search-results event
Change-Id: Ia272a6783d56c75ba775d71195104aad21214121
2013-08-19 08:13:55 +00:00
Santhosh Thottingal
44bd73325a Log font-change event
Change-Id: I093e27d74d047a639082a5da6442944f590c67dc
2013-08-19 06:00:26 +00:00
jenkins-bot
80715de3b2 Merge "Add the Nuosu SIL font for the Yi language" 2013-08-19 05:53:01 +00:00
Santhosh Thottingal
8f5be106f5 Update jquery.ime library
upstream: http://github.com/wikimedia/jquery.ime

changes:
* Support for contenteditable, like the VisualEditor surfaces. This
  support is very minimal now. Because of VE bugs on IME support, many
  things are broken. But one-one keyboard mappings should work with less
  issues. The UI of jquery.ime is not integrated with VE toolbar
* More input methods
	- IPA-X-SAMPA by Amir
	- Armenian keymaps by  Aleksey Chalabyan
	- Kurdish keymaps by Ghybu
	- Кыргыз keymap by Amir
	- Central Kurdish keyboards by Çalak
* A lot of input method bug fixes multiple contributors
* Minor UX fixes

Introduces Rangy library.
A module named rangy is defined in VisualEditor extension with more features of rangy.
Here we need only the core library. This module is loaded dynamically from
client when rangy is undefined. If VE is present rangy will be defined, the module
defined in VE will be used. ie, This get loaded only when VE is not present and
user trying to type in a contenteditable.

Bug: 49569
Bug: 50849
Bug: 50220

Change-Id: Iadad5a4e5972fbd1359847526d28e9dbbe00a7c4
2013-08-19 04:40:08 +00:00