-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Japanese Translation Strings #686
Conversation
I've added additional edits to this pull request, allowing for translated Home Menu, Inbox, Comment and Community headers to show up in the app. I still haven't found where the Inbox subheaders ("Replies", "Mentions", "Messages") or the word "Saved" is in the code in order to be localized. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching these!
In the future, it'd be better to split up these two PRs: one for the translations, and another for the localized strings.
/** | ||
* Returns localized Strings for ListingType Enum | ||
*/ | ||
fun getLocalizedListingTypeName(context: Context, listingType: ListingType): String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow the convention above: ctx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK thanks for the heads up. I was looking for a convention to follow for naming, I found in Utils.kt context: Context instead of ctx was being used in convertSpToPx and getLocalizedSortinTypeName methods so I was following that. I'll make the fixes now and try to push them to this branch.
/** | ||
* Returns localized Strings for CommentSortType Enum | ||
*/ | ||
fun getLocalizedCommentSortTypeName(context: Context, commentSortType: CommentSortType): String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same.
/** | ||
* Returns localized Strings for UnreadOrAll Enum | ||
*/ | ||
fun getLocalizedUnreadOrAllName(context: Context, unreadOrAll: UnreadOrAll): String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same.
@@ -207,13 +209,14 @@ fun CommunityHeaderTitle( | |||
communityName: String, | |||
selectedSortType: SortType, | |||
) { | |||
val context = LocalContext.current |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ctx
@@ -439,13 +442,14 @@ fun HomeHeaderTitle( | |||
selectedSortType: SortType, | |||
selectedListingType: ListingType, | |||
) { | |||
val context = LocalContext.current |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ctx
@@ -79,6 +81,7 @@ fun InboxHeader( | |||
@Composable | |||
fun InboxHeaderTitle(selectedUnreadOrAll: UnreadOrAll, unreadCount: Int? = null) { | |||
var title = stringResource(R.string.inbox_inbox) | |||
val context = LocalContext.current |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
This morning I should have changed the context variable/value names to ctx as per the desired convention. Feel free to let me know if there are any other changes that should be made. Sorry that I'm not the best at Git. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! I'll handle the merge conflicts.
Hello. I added a base set of translation strings for Jerboa in Japanese. It might not be perfect but I think it fits most of the things. - Message [email protected] if you have questions.