mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-26 07:15:32 +00:00
8b7b20b934
* All translations will be in tests/browser/i18n folder * Hebrew json’s are added, which needs to be translated. Paired with Zeljko. Bug: T105466 Change-Id: I4ae516758fb01a41f0dcf53c7cf3e609c7601cf3
13 lines
314 B
Ruby
13 lines
314 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["languagescreenshot-#{string.downcase.gsub(' ', '-')}-text"] || ''
|
|
end
|