-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added N_() and Nn_() gettext equivalents
- to only mark a text for translation - 3.1.12
- Loading branch information
Showing
4 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env rspec | ||
|
||
require_relative "test_helper_rspec" | ||
|
||
require "yast" | ||
|
||
include Yast::I18n | ||
|
||
module Yast | ||
describe I18n do | ||
|
||
describe ".N_" do | ||
it "returns the original parameter" do | ||
input = "INPUT TEST" | ||
expect(N_(input)).to be input | ||
end | ||
end | ||
|
||
describe ".Nn_" do | ||
it "returns the original parameters" do | ||
singular = "singular" | ||
plural = "plural" | ||
count = 42 | ||
|
||
expect(Nn_(singular, plural, count)).to eq [singular, plural, count] | ||
end | ||
end | ||
|
||
end | ||
end |