mediawiki-extensions-Visual.../modules/ve-mw/tests/browser/features/support/env.rb
Amir E. Aharoni d231bcbb19 [BrowserTest] Add prefixes to language screenshot messages
Change-Id: I96c01763d1003619e9c8b0f549a53a1956dde16a
2015-07-20 00:24:42 -05:00

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