-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #669 from quran/use-wbw-translations-approved-flag
Only load approved Word by Word translations
- Loading branch information
Showing
10 changed files
with
72 additions
and
5 deletions.
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
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
22 changes: 22 additions & 0 deletions
22
app/views/api/qdc/resources/word_by_word_translations.json.streamer
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,22 @@ | ||
json.object! do | ||
json.word_by_word_translations do | ||
json.array! @word_by_word_translations do |word_by_word_translation| | ||
json.object! do | ||
json.extract! word_by_word_translation, | ||
:id, | ||
:name, | ||
:author_name, | ||
:slug, | ||
:language_name | ||
json.iso_code word_by_word_translation.language.iso_code | ||
|
||
json.translated_name do | ||
translated_name = word_by_word_translation.translated_name | ||
json.object! do | ||
json.extract! translated_name, :name, :language_name | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
22 changes: 22 additions & 0 deletions
22
app/views/api/v4/resources/word_by_word_translations.json.streamer
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,22 @@ | ||
json.object! do | ||
json.word_by_word_translations do | ||
json.array! @word_by_word_translations do |word_by_word_translation| | ||
json.object! do | ||
json.extract! word_by_word_translation, | ||
:id, | ||
:name, | ||
:author_name, | ||
:slug, | ||
:language_name | ||
json.iso_code word_by_word_translation.language.iso_code | ||
|
||
json.translated_name do | ||
translated_name = word_by_word_translation.translated_name | ||
json.object! do | ||
json.extract! translated_name, :name, :language_name | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
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