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

✨ feat: adding Arabic Language Support #1049

Merged
merged 6 commits into from
Jan 15, 2024
Merged

Conversation

MEClouds
Copy link
Contributor

@MEClouds MEClouds commented Jan 14, 2024

💻 变更类型 | Change Type

  • ✨ feat (New features related to Arabic language support)
  • 🐛 fix
  • ♻️ refactor
  • 💄 style (Styling changes for better readability or aesthetics, including RTL support)
  • 🔨 chore
  • ⚡️ perf
  • 📝 docs

🔀 变更说明 | Description of Change

This pull request introduces Arabic language support to the Lobe Chat project, following the guidelines provided in the Add New Locale documentation.

📝 补充信息 | Additional Information

I have added right-to-left (RTL) style changes to enhance the visual presentation for the Arabic language.

Screenshots

image

image

Copy link

vercel bot commented Jan 14, 2024

@MEClouds is attempting to deploy a commit to the LobeHub Team on Vercel.

A member of the Team first needs to authorize it.

@lobehubbot
Copy link
Member

👍 @MEClouds

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

@arvinxx arvinxx changed the title Pull Request: Adding Arabic Language Support ✨ feat: adding Arabic Language Support Jan 15, 2024
Copy link

vercel bot commented Jan 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lobe-chat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 15, 2024 0:57am

Copy link

codecov bot commented Jan 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (260caa3) 88.31% compared to head (e17905a) 88.32%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1049   +/-   ##
=======================================
  Coverage   88.31%   88.32%           
=======================================
  Files         177      177           
  Lines        8293     8298    +5     
  Branches      942      942           
=======================================
+ Hits         7324     7329    +5     
  Misses        969      969           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@arvinxx arvinxx left a comment

Choose a reason for hiding this comment

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

@MEClouds Thanks for your amazing work! I have check your code, it's great! Just need a few improvements:

  1. There is a FOUC when using Arabic with server side rendering:
image

the fix method is to add the dir attribute to the html tag:
https://github.com/lobehub/lobe-chat/blob/main/src/app/layout.tsx#L25

const direction = isRtlLang(lng?.value) ? 'rtl' : 'ltr';

return <html lang={lang?.value || DEFAULT_LANG} dir={direction} >
  1. Please use native Arabic display here for consistency.
image

src/locales/resources.ts Outdated Show resolved Hide resolved
@MEClouds
Copy link
Contributor Author

Thank you for your kind words! I'm thrilled to hear that you've reviewed the code and found it great. I appreciate your feedback and I'm ready to implement the suggested improvements.

Copy link
Contributor

@arvinxx arvinxx left a comment

Choose a reason for hiding this comment

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

Great Job! LobeChat now are more user friendly with Arabic Locale. I think we can merge this PR.

And I think there are some more improvement we should work with lobe-ui

like SearchBar and DraggablePanel

image image

@arvinxx arvinxx merged commit a325ef9 into lobehub:main Jan 15, 2024
5 checks passed
@lobehubbot
Copy link
Member

❤️ Great PR @MEClouds ❤️

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.
项目的成长离不开用户反馈和贡献,感谢您的贡献! 如果您对 LobeHub 开发者社区感兴趣,请加入我们的 discord,然后私信 @arvinxx@canisminor1990。他们会邀请您加入我们的私密开发者频道。我们将会讨论关于 Lobe Chat 的开发,分享和讨论全球范围内的 AI 消息。

github-actions bot pushed a commit that referenced this pull request Jan 15, 2024
## [Version&nbsp;0.120.0](v0.119.13...v0.120.0)
<sup>Released on **2024-01-15**</sup>

#### ✨ Features

- **misc**: Adding Arabic Language Support.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's improved

* **misc**: Adding Arabic Language Support, closes [#1049](#1049) ([a325ef9](a325ef9))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
@lobehubbot
Copy link
Member

🎉 This PR is included in version 0.120.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

github-actions bot pushed a commit to bentwnghk/lobe-chat that referenced this pull request Jan 15, 2024
## [Version&nbsp;1.2.0](v1.1.8...v1.2.0)
<sup>Released on **2024-01-15**</sup>

#### ✨ Features

- **misc**: Adding Arabic Language Support.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's improved

* **misc**: Adding Arabic Language Support, closes [lobehub#1049](https://github.com/bentwnghk/lobe-chat/issues/1049) ([a325ef9](a325ef9))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
@Wxh16144 Wxh16144 mentioned this pull request Jan 28, 2024
7 tasks
miroshar-success added a commit to miroshar-success/OpenAI_Integraion_platform that referenced this pull request Apr 5, 2024
## [Version&nbsp;0.120.0](lobehub/lobe-chat@v0.119.13...v0.120.0)
<sup>Released on **2024-01-15**</sup>

#### ✨ Features

- **misc**: Adding Arabic Language Support.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's improved

* **misc**: Adding Arabic Language Support, closes [#1049](lobehub/lobe-chat#1049) ([a325ef9](lobehub/lobe-chat@a325ef9))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants