Skip to content

Commit

Permalink
Breaking: Use EmojiCategory#categoryNames Map<String, String> instead…
Browse files Browse the repository at this point in the history
… of Android Resource for proper Multiplatform support.
  • Loading branch information
vanniktech committed May 26, 2022
1 parent 4df7ea4 commit 42e4ab1
Show file tree
Hide file tree
Showing 60 changed files with 265 additions and 283 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.vanniktech.emoji.facebook.category

import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
import com.vanniktech.emoji.EmojiAndroidCategory
import com.vanniktech.emoji.EmojiCategory
import com.vanniktech.emoji.facebook.FacebookEmoji
Expand All @@ -26,8 +25,11 @@ internal class ActivitiesCategory : EmojiCategory, EmojiAndroidCategory {
@get:DrawableRes override val icon: Int
get() = com.vanniktech.emoji.facebook.R.drawable.emoji_facebook_category_activities

@get:StringRes override val categoryName: Int
get() = com.vanniktech.emoji.facebook.R.string.emoji_facebook_category_activities
override val categoryNames: Map<String, String>
get() = mapOf(
"en" to "Activities",
"de" to "Aktivitäten",
)

override val emojis = ALL_EMOJIS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.vanniktech.emoji.facebook.category

import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
import com.vanniktech.emoji.EmojiAndroidCategory
import com.vanniktech.emoji.EmojiCategory
import com.vanniktech.emoji.facebook.FacebookEmoji
Expand All @@ -26,8 +25,11 @@ internal class AnimalsAndNatureCategory : EmojiCategory, EmojiAndroidCategory {
@get:DrawableRes override val icon: Int
get() = com.vanniktech.emoji.facebook.R.drawable.emoji_facebook_category_animalsandnature

@get:StringRes override val categoryName: Int
get() = com.vanniktech.emoji.facebook.R.string.emoji_facebook_category_animalsandnature
override val categoryNames: Map<String, String>
get() = mapOf(
"en" to "Nature",
"de" to "Natur",
)

override val emojis = ALL_EMOJIS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.vanniktech.emoji.facebook.category

import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
import com.vanniktech.emoji.EmojiAndroidCategory
import com.vanniktech.emoji.EmojiCategory
import com.vanniktech.emoji.facebook.FacebookEmoji
Expand All @@ -26,8 +25,11 @@ internal class FlagsCategory : EmojiCategory, EmojiAndroidCategory {
@get:DrawableRes override val icon: Int
get() = com.vanniktech.emoji.facebook.R.drawable.emoji_facebook_category_flags

@get:StringRes override val categoryName: Int
get() = com.vanniktech.emoji.facebook.R.string.emoji_facebook_category_flags
override val categoryNames: Map<String, String>
get() = mapOf(
"en" to "Flags",
"de" to "Flaggen",
)

override val emojis = ALL_EMOJIS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.vanniktech.emoji.facebook.category

import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
import com.vanniktech.emoji.EmojiAndroidCategory
import com.vanniktech.emoji.EmojiCategory
import com.vanniktech.emoji.facebook.FacebookEmoji
Expand All @@ -26,8 +25,11 @@ internal class FoodAndDrinkCategory : EmojiCategory, EmojiAndroidCategory {
@get:DrawableRes override val icon: Int
get() = com.vanniktech.emoji.facebook.R.drawable.emoji_facebook_category_foodanddrink

@get:StringRes override val categoryName: Int
get() = com.vanniktech.emoji.facebook.R.string.emoji_facebook_category_foodanddrink
override val categoryNames: Map<String, String>
get() = mapOf(
"en" to "Food",
"de" to "Essen",
)

override val emojis = ALL_EMOJIS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.vanniktech.emoji.facebook.category

import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
import com.vanniktech.emoji.EmojiAndroidCategory
import com.vanniktech.emoji.EmojiCategory
import com.vanniktech.emoji.facebook.FacebookEmoji
Expand All @@ -26,8 +25,11 @@ internal class ObjectsCategory : EmojiCategory, EmojiAndroidCategory {
@get:DrawableRes override val icon: Int
get() = com.vanniktech.emoji.facebook.R.drawable.emoji_facebook_category_objects

@get:StringRes override val categoryName: Int
get() = com.vanniktech.emoji.facebook.R.string.emoji_facebook_category_objects
override val categoryNames: Map<String, String>
get() = mapOf(
"en" to "Objects",
"de" to "Objekte",
)

override val emojis = ALL_EMOJIS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.vanniktech.emoji.facebook.category

import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
import com.vanniktech.emoji.EmojiAndroidCategory
import com.vanniktech.emoji.EmojiCategory
import com.vanniktech.emoji.facebook.FacebookEmoji
Expand All @@ -26,8 +25,11 @@ internal class SmileysAndPeopleCategory : EmojiCategory, EmojiAndroidCategory {
@get:DrawableRes override val icon: Int
get() = com.vanniktech.emoji.facebook.R.drawable.emoji_facebook_category_smileysandpeople

@get:StringRes override val categoryName: Int
get() = com.vanniktech.emoji.facebook.R.string.emoji_facebook_category_smileysandpeople
override val categoryNames: Map<String, String>
get() = mapOf(
"en" to "Faces",
"de" to "Gesichter",
)

override val emojis = ALL_EMOJIS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.vanniktech.emoji.facebook.category

import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
import com.vanniktech.emoji.EmojiAndroidCategory
import com.vanniktech.emoji.EmojiCategory
import com.vanniktech.emoji.facebook.FacebookEmoji
Expand All @@ -26,8 +25,11 @@ internal class SymbolsCategory : EmojiCategory, EmojiAndroidCategory {
@get:DrawableRes override val icon: Int
get() = com.vanniktech.emoji.facebook.R.drawable.emoji_facebook_category_symbols

@get:StringRes override val categoryName: Int
get() = com.vanniktech.emoji.facebook.R.string.emoji_facebook_category_symbols
override val categoryNames: Map<String, String>
get() = mapOf(
"en" to "Symbols",
"de" to "Symbole",
)

override val emojis = ALL_EMOJIS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.vanniktech.emoji.facebook.category

import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
import com.vanniktech.emoji.EmojiAndroidCategory
import com.vanniktech.emoji.EmojiCategory
import com.vanniktech.emoji.facebook.FacebookEmoji
Expand All @@ -26,8 +25,11 @@ internal class TravelAndPlacesCategory : EmojiCategory, EmojiAndroidCategory {
@get:DrawableRes override val icon: Int
get() = com.vanniktech.emoji.facebook.R.drawable.emoji_facebook_category_travelandplaces

@get:StringRes override val categoryName: Int
get() = com.vanniktech.emoji.facebook.R.string.emoji_facebook_category_travelandplaces
override val categoryNames: Map<String, String>
get() = mapOf(
"en" to "Places",
"de" to "Orte",
)

override val emojis = ALL_EMOJIS

Expand Down
11 changes: 0 additions & 11 deletions emoji-facebook/src/androidMain/res/values-de/strings.xml

This file was deleted.

11 changes: 0 additions & 11 deletions emoji-facebook/src/androidMain/res/values/strings.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.vanniktech.emoji.googlecompat.category

import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
import com.vanniktech.emoji.EmojiAndroidCategory
import com.vanniktech.emoji.EmojiCategory
import com.vanniktech.emoji.googlecompat.GoogleCompatEmoji
Expand All @@ -26,8 +25,11 @@ internal class ActivitiesCategory : EmojiCategory, EmojiAndroidCategory {
@get:DrawableRes override val icon: Int
get() = com.vanniktech.emoji.googlecompat.R.drawable.emoji_googlecompat_category_activities

@get:StringRes override val categoryName: Int
get() = com.vanniktech.emoji.googlecompat.R.string.emoji_googlecompat_category_activities
override val categoryNames: Map<String, String>
get() = mapOf(
"en" to "Activities",
"de" to "Aktivitäten",
)

override val emojis = ALL_EMOJIS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.vanniktech.emoji.googlecompat.category

import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
import com.vanniktech.emoji.EmojiAndroidCategory
import com.vanniktech.emoji.EmojiCategory
import com.vanniktech.emoji.googlecompat.GoogleCompatEmoji
Expand All @@ -26,8 +25,11 @@ internal class AnimalsAndNatureCategory : EmojiCategory, EmojiAndroidCategory {
@get:DrawableRes override val icon: Int
get() = com.vanniktech.emoji.googlecompat.R.drawable.emoji_googlecompat_category_animalsandnature

@get:StringRes override val categoryName: Int
get() = com.vanniktech.emoji.googlecompat.R.string.emoji_googlecompat_category_animalsandnature
override val categoryNames: Map<String, String>
get() = mapOf(
"en" to "Nature",
"de" to "Natur",
)

override val emojis = ALL_EMOJIS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.vanniktech.emoji.googlecompat.category

import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
import com.vanniktech.emoji.EmojiAndroidCategory
import com.vanniktech.emoji.EmojiCategory
import com.vanniktech.emoji.googlecompat.GoogleCompatEmoji
Expand All @@ -26,8 +25,11 @@ internal class FlagsCategory : EmojiCategory, EmojiAndroidCategory {
@get:DrawableRes override val icon: Int
get() = com.vanniktech.emoji.googlecompat.R.drawable.emoji_googlecompat_category_flags

@get:StringRes override val categoryName: Int
get() = com.vanniktech.emoji.googlecompat.R.string.emoji_googlecompat_category_flags
override val categoryNames: Map<String, String>
get() = mapOf(
"en" to "Flags",
"de" to "Flaggen",
)

override val emojis = ALL_EMOJIS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.vanniktech.emoji.googlecompat.category

import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
import com.vanniktech.emoji.EmojiAndroidCategory
import com.vanniktech.emoji.EmojiCategory
import com.vanniktech.emoji.googlecompat.GoogleCompatEmoji
Expand All @@ -26,8 +25,11 @@ internal class FoodAndDrinkCategory : EmojiCategory, EmojiAndroidCategory {
@get:DrawableRes override val icon: Int
get() = com.vanniktech.emoji.googlecompat.R.drawable.emoji_googlecompat_category_foodanddrink

@get:StringRes override val categoryName: Int
get() = com.vanniktech.emoji.googlecompat.R.string.emoji_googlecompat_category_foodanddrink
override val categoryNames: Map<String, String>
get() = mapOf(
"en" to "Food",
"de" to "Essen",
)

override val emojis = ALL_EMOJIS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.vanniktech.emoji.googlecompat.category

import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
import com.vanniktech.emoji.EmojiAndroidCategory
import com.vanniktech.emoji.EmojiCategory
import com.vanniktech.emoji.googlecompat.GoogleCompatEmoji
Expand All @@ -26,8 +25,11 @@ internal class ObjectsCategory : EmojiCategory, EmojiAndroidCategory {
@get:DrawableRes override val icon: Int
get() = com.vanniktech.emoji.googlecompat.R.drawable.emoji_googlecompat_category_objects

@get:StringRes override val categoryName: Int
get() = com.vanniktech.emoji.googlecompat.R.string.emoji_googlecompat_category_objects
override val categoryNames: Map<String, String>
get() = mapOf(
"en" to "Objects",
"de" to "Objekte",
)

override val emojis = ALL_EMOJIS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.vanniktech.emoji.googlecompat.category

import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
import com.vanniktech.emoji.EmojiAndroidCategory
import com.vanniktech.emoji.EmojiCategory
import com.vanniktech.emoji.googlecompat.GoogleCompatEmoji
Expand All @@ -26,8 +25,11 @@ internal class SmileysAndPeopleCategory : EmojiCategory, EmojiAndroidCategory {
@get:DrawableRes override val icon: Int
get() = com.vanniktech.emoji.googlecompat.R.drawable.emoji_googlecompat_category_smileysandpeople

@get:StringRes override val categoryName: Int
get() = com.vanniktech.emoji.googlecompat.R.string.emoji_googlecompat_category_smileysandpeople
override val categoryNames: Map<String, String>
get() = mapOf(
"en" to "Faces",
"de" to "Gesichter",
)

override val emojis = ALL_EMOJIS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.vanniktech.emoji.googlecompat.category

import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
import com.vanniktech.emoji.EmojiAndroidCategory
import com.vanniktech.emoji.EmojiCategory
import com.vanniktech.emoji.googlecompat.GoogleCompatEmoji
Expand All @@ -26,8 +25,11 @@ internal class SymbolsCategory : EmojiCategory, EmojiAndroidCategory {
@get:DrawableRes override val icon: Int
get() = com.vanniktech.emoji.googlecompat.R.drawable.emoji_googlecompat_category_symbols

@get:StringRes override val categoryName: Int
get() = com.vanniktech.emoji.googlecompat.R.string.emoji_googlecompat_category_symbols
override val categoryNames: Map<String, String>
get() = mapOf(
"en" to "Symbols",
"de" to "Symbole",
)

override val emojis = ALL_EMOJIS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.vanniktech.emoji.googlecompat.category

import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
import com.vanniktech.emoji.EmojiAndroidCategory
import com.vanniktech.emoji.EmojiCategory
import com.vanniktech.emoji.googlecompat.GoogleCompatEmoji
Expand All @@ -26,8 +25,11 @@ internal class TravelAndPlacesCategory : EmojiCategory, EmojiAndroidCategory {
@get:DrawableRes override val icon: Int
get() = com.vanniktech.emoji.googlecompat.R.drawable.emoji_googlecompat_category_travelandplaces

@get:StringRes override val categoryName: Int
get() = com.vanniktech.emoji.googlecompat.R.string.emoji_googlecompat_category_travelandplaces
override val categoryNames: Map<String, String>
get() = mapOf(
"en" to "Places",
"de" to "Orte",
)

override val emojis = ALL_EMOJIS

Expand Down
11 changes: 0 additions & 11 deletions emoji-google-compat/src/androidMain/res/values-de/strings.xml

This file was deleted.

11 changes: 0 additions & 11 deletions emoji-google-compat/src/androidMain/res/values/strings.xml

This file was deleted.

Loading

0 comments on commit 42e4ab1

Please sign in to comment.