-
Notifications
You must be signed in to change notification settings - Fork 103
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
useState translation #521
useState translation #521
Conversation
I hope my request will be approved |
@@ -4,7 +4,7 @@ title: useState | |||
|
|||
<Intro> | |||
|
|||
`useState` is a React Hook that lets you add a [state variable](/learn/state-a-components-memory) to your component. | |||
`useState` هو Hook في React يتيح لك إضافة متغير حالة إلى مكونك |
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.
في الصفحات الأخرى تم ترجمة كلمة hook إلى خطاف. يفضل أن تترجمها للتلائم مع باقي الصفحات
@@ -16,11 +16,12 @@ const [state, setState] = useState(initialState); | |||
|
|||
--- | |||
|
|||
## Reference {/*reference*/} | |||
## الإشارة الى المرجع {/*reference*/} |
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.
تكفي كلمة "المرجع"
Size changes📦 Next.js Bundle Analysis for react-devThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
@@ -32,33 +33,32 @@ function MyComponent() { | |||
// ... | |||
``` | |||
|
|||
The convention is to name state variables like `[something, setSomething]` using [array destructuring.](https://javascript.info/destructuring-assignment) | |||
التقليد هو تسمية متغيرات الحالة بشكل مثل `[something, setSomething]` باستخدام [array destructuring] [تفكيك الصفائف](https://javascript.info/destructuring-assignment) |
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.
اعتدنا في الترجمة أني نترجم array إلى مصفوفة
I'll complete reviewing later. Please read your translation again and rephrase what require |
when i pushed the changes i got "This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository." |
Here's the corrected version of your text with grammar and wording improvements: Short: That happened because you rebased between commits. TL;DR: If you're collaborating on a project with other developers (like this one), refrain from making direct edits to the main branch. Instead, create a new branch if you need to make edits: # Create a new branch
git branch translating-use-state
# Switch to the new branch
git checkout translating-use-state
# Alternatively, you can combine the two previous commands into one
git checkout -b translating-use-state
# This will create a branch named "translating-use-state" and switch to it. Make the necessary edits, and then commit them, as usual, using # When pushing the branch for the first time
git push -u origin translating-use-state
# After the first push
git push This approach keeps your main branch untouched. When you intend to start a new branch: # Return to the main branch
git checkout main
# Create a new branch
git checkout -b translating-use-effect I have a solution for your issue, but it might be complex and challenging for you. Therefore, consider deleting your forked repository, as you made edits directly to the main branch. Then, fork the repository again. In a separate directory on your computer, clone the repository again and create a new branch as instructed earlier. Copy your translation from this link and paste it at the end of this comment. Finally, open a new pull request # Execute these commands one by one
git clone https://github.com/r-m169/ar.react.dev.git
# You'll now have a new directory named 'ar.react.dev'
cd ar.react.dev
# Open Visual Studio Code
code .
# Create a new branch and switch to it
git checkout -b translating-use-state
# Now copy the text from the link and paste it into 'src/content/reference/react/useState.md'
# Make your changes
# Then push the branch
git push -u origin translating-use-state
# Commit your changes
git add .
git commit -m "Translating useState reference"
git push Your translation can be found here. Let me know if you face a problem. |
No description provided.