Skip to content

Commit

Permalink
Add journalistic blocking reason
Browse files Browse the repository at this point in the history
  • Loading branch information
MGaetan89 committed May 8, 2024
1 parent 950ce8f commit e44ac72
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ fun BlockReason.getStringResId(): Int {
BlockReason.AGERATING18 -> R.string.blockReason_ageRating18
BlockReason.STARTDATE -> R.string.blockReason_startDate
BlockReason.ENDDATE -> R.string.blockReason_endDate
BlockReason.JOURNALISTIC -> R.string.blockReason_journalistic
BlockReason.UNKNOWN -> R.string.blockReason_unknown
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ enum class BlockReason {
AGERATING12,
STARTDATE,
ENDDATE,
JOURNALISTIC,
UNKNOWN,
}
1 change: 1 addition & 0 deletions pillarbox-core-business/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
<string name="blockReason_ageRating12">Dieser Inhalt ist aus Gründen des Jugendschutzes nur zwischen 20:00 und 6:00 Uhr verfügbar.</string>
<string name="blockReason_startDate">Dieser Inhalt ist noch nicht verfügbar.</string>
<string name="blockReason_endDate">Dieser Inhalt ist nicht mehr verfügbar.</string>
<string name="blockReason_journalistic">Dieser Inhalt steht aus publizistischen Gründen vorübergehend nicht zur Verfügung.</string>
<string name="blockReason_unknown">Dieser Inhalt ist nicht verfügbar.</string>
</resources>
1 change: 1 addition & 0 deletions pillarbox-core-business/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
<string name="blockReason_ageRating12">Ce contenu n\'est disponible qu\'entre 20h et 6h afin de protéger le jeune public.</string>
<string name="blockReason_startDate">Ce contenu n’est pas encore disponible.</string>
<string name="blockReason_endDate">Ce contenu n’est plus disponible.</string>
<string name="blockReason_journalistic">Ce contenu est temporairement indisponible pour des raisons éditoriales.</string>
<string name="blockReason_unknown">Ce contenu n’est pas disponible.</string>
</resources>
1 change: 1 addition & 0 deletions pillarbox-core-business/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
<string name="blockReason_ageRating12">Per proteggere i bambini, questo contenuto è disponibile solo tra le 20 e le 6.</string>
<string name="blockReason_startDate">Questo contenuto non è ancora disponibile.</string>
<string name="blockReason_endDate">Questo contenuto non è più disponibile.</string>
<string name="blockReason_journalistic">Questo contenuto è temporaneamente non disponibile per motivi editoriali.</string>
<string name="blockReason_unknown">Questo contenuto non è disponibile.</string>
</resources>
1 change: 1 addition & 0 deletions pillarbox-core-business/src/main/res/values-rm/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
<string name="blockReason_ageRating12">Per proteger ils uffants è quest cuntegn disponibel mo tranter las 20.00 e las 06.00.</string>
<string name="blockReason_startDate">Quest medium n\'è betg anc disponibel.</string>
<string name="blockReason_endDate">Quest medium n\'è betg pli disponibel.</string>
<string name="blockReason_journalistic">Quest cuntegn na stat ad interim betg a disposiziun per motivs publicistics.</string>
<string name="blockReason_unknown">Quest medium n\'è betg disponibel.</string>
</resources>
1 change: 1 addition & 0 deletions pillarbox-core-business/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
<string name="blockReason_ageRating12">To protect children this content is only available between 8PM and 6AM.</string>
<string name="blockReason_startDate">This content is not available yet.</string>
<string name="blockReason_endDate">This content is not available anymore.</string>
<string name="blockReason_journalistic">This content is temporarily unavailable for journalistic reasons.</string>
<string name="blockReason_unknown">This content is not available.</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class BlockReasonTest {
assertEquals("This content is not available outside Switzerland.", context.getString(BlockReason.GEOBLOCK))
assertEquals("This content is not available due to legal restrictions.", context.getString(BlockReason.LEGAL))
assertEquals("This content is not available yet.", context.getString(BlockReason.STARTDATE))
assertEquals("This content is temporarily unavailable for journalistic reasons.", context.getString(BlockReason.JOURNALISTIC))
assertEquals("This content is not available.", context.getString(BlockReason.UNKNOWN))
}

Expand All @@ -38,6 +39,7 @@ class BlockReasonTest {
assertEquals(R.string.blockReason_geoBlock, BlockReason.GEOBLOCK.getStringResId())
assertEquals(R.string.blockReason_legal, BlockReason.LEGAL.getStringResId())
assertEquals(R.string.blockReason_startDate, BlockReason.STARTDATE.getStringResId())
assertEquals(R.string.blockReason_journalistic, BlockReason.JOURNALISTIC.getStringResId())
assertEquals(R.string.blockReason_unknown, BlockReason.UNKNOWN.getStringResId())
}
}

0 comments on commit e44ac72

Please sign in to comment.