Skip to content
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

Merged
merged 5 commits into from
Jun 19, 2023

Conversation

ShinyLuxray
Copy link
Contributor

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.

@ShinyLuxray
Copy link
Contributor Author

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.

Copy link
Member

@dessalines dessalines left a 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 {
Copy link
Member

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

Copy link
Contributor Author

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 {
Copy link
Member

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 {
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

@ShinyLuxray
Copy link
Contributor Author

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.

Copy link
Member

@dessalines dessalines left a 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.

@dessalines dessalines merged commit 7c36556 into LemmyNet:main Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants