mediawiki-extensions-Visual.../modules/ve-mw/tests/browser/features/support/env.rb

13 lines
314 B
Ruby
Raw Normal View History

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["languagescreenshot-#{string.downcase.gsub(' ', '-')}-text"] || ''
end