MCPcopy
hub / github.com/codeceptjs/CodeceptJS / getTranslation

Function getTranslation

lib/mocha/gherkin.js:210–227  ·  view source on GitHub ↗
(language)

Source from the content-addressed store, hash-verified

208}
209
210function getTranslation(language) {
211 if (!translations) {
212 // Translations not loaded yet, return null (will use default)
213 return null
214 }
215
216 const translationKeys = Object.keys(translations)
217 for (const availableTranslation of translationKeys) {
218 if (!language) {
219 break
220 }
221
222 if (availableTranslation.includes(language)) {
223 return translations[availableTranslation]
224 }
225 }
226 return null
227}
228
229export { loadTranslations }
230export default gherkinParser

Callers 1

gherkinParserFunction · 0.85

Calls 1

includesMethod · 0.80

Tested by

no test coverage detected