mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
d231bcbb19
Change-Id: I96c01763d1003619e9c8b0f549a53a1956dde16a
13 lines
327 B
Ruby
13 lines
327 B
Ruby
require_relative 'hooks'
|
|
require 'mediawiki_selenium'
|
|
require 'mediawiki_api'
|
|
require 'screenshot'
|
|
|
|
include MediawikiApi
|
|
|
|
def translate(string)
|
|
file = File.read "i18n/#{ENV['LANGUAGE_SCREENSHOT_CODE']}.json"
|
|
json = JSON.parse(file)
|
|
json["visualeditor-languagescreenshot-#{string.downcase.gsub(' ', '-')}-text"] || ''
|
|
end
|