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

Improve localization marks #3285

Merged
merged 33 commits into from
May 7, 2024
Merged

Improve localization marks #3285

merged 33 commits into from
May 7, 2024

Conversation

quiple
Copy link
Contributor

@quiple quiple commented Mar 20, 2024

<Text style={[t.atoms.text, a.text_md, a.leading_snug, a.mt_lg]}>
  {modcause.source.type === 'user' ? (
    <Trans>This label was applied by the author.</Trans>
  ) : (
    <Trans>
      This label was applied by{' '}
      <InlineLinkText
        to={makeProfileLink({did: modcause.label.src, handle: ''})}
        onPress={() => control.close()}
        style={a.text_md}>
        {desc.source}
      </InlineLinkText>
      .
    </Trans>
  )}
</Text>
  <Trans>
    <Text type="xl-medium" style={pal.text}>
      {formatCountShortOnly(profile?.followersCount ?? 0)}
    </Text>{' '}
    <Plural
      value={profile?.followersCount || 0}
      one="follower"
      other="followers"
-   />{' '}
-   &middot;{' '}
- </Trans>
+   />
+ </Trans>{' '}
+ &middot;{' '}

Changes the position of <Trans> for easier localization.


<Trans>
  Delete Account{' '}
  <Text type="title-xl" style={[pal.text, s.bold]}>
    "
  </Text>
  <Text
    type="title-xl"
    numberOfLines={1}
    style={[
      isMobile ? styles.titleMobile : styles.titleDesktop,
      pal.text,
      s.bold,
    ]}>
    {currentAccount?.handle}
  </Text>
  <Text type="title-xl" style={[pal.text, s.bold]}>
    "
  </Text>
</Trans>
<Trans>
  Step {state.activeStep + 1} of{' '}
  {state.serviceDescription &&
  !state.serviceDescription.phoneVerificationRequired
    ? '2'
    : '3'}
</Trans>

Changes the position of <Trans> for localization in languages with reversed word order.


- <Text type="md-bold" style={[pal.textLight, s.mr5]}>
-   <Trans>Not Applicable.</Trans>
- </Text>
  <Trans>
+   <Text type="md-bold" style={[pal.textLight]}>
+     Not Applicable.
+   </Text>{' '}
    This warning is only available for posts with media attached.
  </Trans>

Replaces the right margin with a whitespace and changes the position of <Trans> for easier localization.


  label={
-   profileShadow.viewer?.following ? _('Following') : _('Follow')
+   profileShadow.viewer?.following ? _(msg`Following`) : _(msg`Follow`)
  }
  <ButtonText>
-   {profileShadow.viewer?.following ? _('Following') : _('Follow')}
+   {profileShadow.viewer?.following ? _(msg`Following`) : _(msg`Follow`)}
  </ButtonText>
  <Text
    style={[
      a.text_md,
      a.font_bold,
      {
        color: t.palette.negative_900,
      },
    ]}>
-   Error:{' '}
+   <Trans>Error:</Trans>{' '}
  </Text>
- {error?.message || 'an unknown error occurred'}
+ {error?.message || _(msg`an unknown error occurred`)}
- by @{feed.creatorHandle}
+ <Trans>by @{feed.creatorHandle}</Trans>
 {canSave
   ? _(msg`Update to ${handle}`)
-  : _(msg`Verify ${isDNSForm ? 'DNS Record' : 'Text File'}`)}
+  : isDNSForm
+  ? _(msg`Verify DNS Record`)
+  : _(msg`Verify Text File`)}

Enables localization of these strings.


- Toast.show(_(msg`Saved to your camera roll.`))
+ Toast.show(_(msg`Saved to your camera roll`))
- Toast.show(_(msg`Appeal submitted.`))
+ Toast.show(_(msg`Appeal submitted`))

Removes trailing periods, as do many other toast messages used in Bluesky.


- <Trans>
    <Text style={[a.text_md, a.font_bold]}>{following} </Text>
    <Text style={[t.atoms.text_contrast_medium]}>
      {pluralizedFollowings}
    </Text>
- </Trans>

Removes unnecessary <Trans> tags.

@surfdude29
Copy link
Contributor

You might want to add these toasts in the image picker to be localised:

Toast.show('You may only select up to 4 images')

Toast.show('Only image files are supported')

@quiple
Copy link
Contributor Author

quiple commented May 7, 2024

@pfrazee Hello, can I ask you to review this PR?

Copy link
Collaborator

@pfrazee pfrazee left a comment

Choose a reason for hiding this comment

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

Yep this all looks solid. Thanks so much, quiple!

@pfrazee pfrazee merged commit 2ea9e2c into bluesky-social:main May 7, 2024
6 checks passed
@quiple quiple deleted the patch-3 branch May 7, 2024 03:57
tkusano pushed a commit to tkusano/social-app that referenced this pull request May 7, 2024
* Update Lightbox.tsx

* Change strings for easier localization

* Update DeleteAccount.tsx

* Update LabelsOnMeDialog.tsx

* Update FeedCard.tsx

* Update index.tsx

* Update LabelsOnMeDialog.tsx

* Update index.tsx

* Update FeedCard.tsx

* Update SelfLabel.tsx

* Update Hashtag.tsx

* Update index.tsx

* Update Hashtag.tsx

* Update ChangeHandle.tsx

* Update index.web.tsx

* Update index.web.tsx

* Update index.tsx

* Remove unnecessary `<Trans>` tags

* Update Drawer.tsx
tkusano added a commit to tkusano/social-app that referenced this pull request May 7, 2024
pfrazee pushed a commit that referenced this pull request May 20, 2024
* Update Japanese translations

* Updated as PR on Plural is merged (#3882)
* Feedback API (#3498)

etc.

* Improve localization marks (#3285)

* Update Lightbox.tsx

* Change strings for easier localization

* Update DeleteAccount.tsx

* Update LabelsOnMeDialog.tsx

* Update FeedCard.tsx

* Update index.tsx

* Update LabelsOnMeDialog.tsx

* Update index.tsx

* Update FeedCard.tsx

* Update SelfLabel.tsx

* Update Hashtag.tsx

* Update index.tsx

* Update Hashtag.tsx

* Update ChangeHandle.tsx

* Update index.web.tsx

* Update index.web.tsx

* Update index.tsx

* Remove unnecessary `<Trans>` tags

* Update Drawer.tsx

* Finnish translation update (#3755)

* Update messages.po

Translated new strings (GIF's etc) and cleaned up deprecated ones.

* Update messages.po

resolve conflict

* Update messages.po

removed double quotes. Thanks @lapanti

* fix bad bool check in action (#3885)

* fix bad bool check in action

* add `fetch-depth` so we can get the commit hash

* `.env` should be in `.easignore` 🙃

* Updated to follow #3285 etc.

* The translation of 'place' and 'apply' of labels has been unified into '適用する'.

* Fix translation of "repost"

* Updated

* Updated Japanese translation

* Updated Japanese translation

- #3816

* Fixed translations

* Updated translation : #3995

* Updated Japanese translation

* Updated Japanese translation (ref. #3962 #4028)

* Updated Japanese translation

* Updated Japanese translation

* Updated Japanese translation

---------

Co-authored-by: Minseo Lee <[email protected]>
Co-authored-by: Jan-Olof Eriksson <[email protected]>
Co-authored-by: Hailey <[email protected]>
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