io.github.frikit.twirlspec.i18n

Members list

Type members

Classlikes

trait I18nChecks extends TwirlSpecDsl

Compares the same view rendered in several languages.

Compares the same view rendered in several languages.

renderInEachLanguage(memberNameView(form, edit = false)) must translateConsistently

The first page is the base by default, or nominate one with basedOn. Nothing here knows about any particular language.

Attributes

Source
I18nChecks.scala
Supertypes
trait TwirlSpecDsl
class Object
trait Matchable
class Any
Show all
Known subtypes
trait AllChecks
trait PageCases
trait TwirlSuite
Show all

The default configuration, and what it leaves untranslated.

The default configuration, and what it leaves untranslated.

Attributes

Companion
class
Source
TranslationStandards.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class TranslationConfig(sameTextIsFine: Set[String] = ...)

What a page is allowed to differ by between languages.

What a page is allowed to differ by between languages.

Value parameters

sameTextIsFine

text that legitimately reads the same in every language: product names, units, anything not worth translating

Attributes

Companion
object
Source
TranslationStandards.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class TranslationRule(id: String, description: String, severity: Severity = ...)(run: (Page, Page) => Seq[Violation])

One check comparing a translated page against the language it was translated from.

One check comparing a translated page against the language it was translated from.

Attributes

Source
TranslationStandards.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Whether a view says the same thing in every language it is offered in.

Whether a view says the same thing in every language it is offered in.

The message-file checks in twirl-spec-messages compare the files. These compare the pages those files produce, which is where a translation that parses but renders differently shows up: a control that vanished, a link that kept its English href, a heading level that moved.

Nothing here is specific to any language pair. Nominate a base and every other language is measured against it.

Attributes

Source
TranslationStandards.scala
Supertypes
class Object
trait Matchable
class Any
Self type