Sha256: d5ff40d0d8aa7fb4ef62fc66781828a9509fb33520c53937178d7a57ef3d128f
Contents?: true
Size: 1.57 KB
Versions: 2
Compression:
Stored size: 1.57 KB
Contents
Feature: Get a translation In order to get a translation of an identifier As a developer of an internationalized app I want to have a simple syntax @rollback Scenario: Simple example and simple translation Given a source file "translations/en.yaml" with: """ hello: Hello World! """ When I have the locale setted as "en" And I write "hello" in the translation engine Then I should see "Hello World!" @rollback Scenario: Not so simple, more interesting case Given a source file "translations/ru.yml" with: """ home: country: Российская Федерация """ When I have the locale setted as "ru" And I write "home.country" in the translation engine Then I should see "Российская Федерация" @rollback Scenario: With several languages and changing language on the fly Given a source file "translations/es-ar.yaml" with: """ home: country: legal_name: República Argentina """ And a source file "translations/ja.yml" with: """ home: country: legal_name: 日本国 """ When I have the locale setted as "es-ar" And I write "home.country.legal_name" in the translation engine Then I should see "República Argentina" When I have the locale setted as "ja" And I write "home.country.legal_name" in the translation engine Then I should see "日本国" @rollback Scenario: Locale left default Given a source file "translations/en.yaml" with: """ comes: from: USA """ When I write "comes.from" in the translation engine Then I should see "USA"
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
g11n-0.0.4 | features/get_a_translation.feature |
g11n-0.0.3 | features/get_a_translation.feature |