diff --git a/guide/arabic/swift/constants/index.md b/guide/arabic/swift/constants/index.md index cbfe68cd90..1e8fe08d50 100644 --- a/guide/arabic/swift/constants/index.md +++ b/guide/arabic/swift/constants/index.md @@ -8,8 +8,9 @@ localeTitle: الثوابت #### مثال: - `let name = "Chris Lattner" -` +```swift +let name = "Chris Lattner" +``` قمت بتعريف الثوابت مع `let` الكلمة ثم إعطائه اسما `name` ثم كنت تستخدم عامل التعيين `=` لتعيين قيمة `"Chris Lattner"` إلى ثابت `name` . diff --git a/guide/arabic/swift/index.md b/guide/arabic/swift/index.md index 738937691f..52370ab9d3 100644 --- a/guide/arabic/swift/index.md +++ b/guide/arabic/swift/index.md @@ -16,27 +16,30 @@ Swift هي لغة برمجة [مفتوحة المصدر](https://en.wikipedia.or للإعلان عن متغير في Swift ، ببساطة استخدم var متبوعًا باسم المتغير الخاص بك. - `var x = 6 - var name = "Bob" - var boole = true - - x = 3 -` +```Swift +var x = 6 +var name = "Bob" +var boole = true + +x = 3 +``` تشبه الثوابت المتغيرات ، لكنها لا يمكن أن تتغير في القيمة بعد الإنشاء. - `let x = 6 - let name = "Bob" - let boole = true -` +```Swift +let x = 6 +let name = "Bob" +let boole = true +``` لطباعة أي شيء إلى الإخراج القياسي ، ما عليك سوى استخدام print () ووضع الإخراج في الأقواس. - `let x = "World" - - print("Hello ") - print(x) -` +```Swift +let x = "World" + +print("Hello ") +print(x) +``` # الإصدار diff --git a/guide/arabic/typescript/array-type/index.md b/guide/arabic/typescript/array-type/index.md index 74cf062712..49007691a0 100644 --- a/guide/arabic/typescript/array-type/index.md +++ b/guide/arabic/typescript/array-type/index.md @@ -9,14 +9,16 @@ localeTitle: نوع المصفوفة **نوع البيانات\[\]** DataType متبوعة بأقواس مربعة `[]` - `let names: string[] = ['Javier', 'Emma', 'John', 'Sophia', 'Emma']; -` +```typescript +let names: string[] = ['Javier', 'Emma', 'John', 'Sophia', 'Emma']; +``` **مجموعة <نوع البيانات>** `Array` متبوعة - `let names: Array = ['Javier', 'Emma', 'John', 'Sophia', 'Emma']; -` +```typescript +let names: Array = ['Javier', 'Emma', 'John', 'Sophia', 'Emma']; +``` ## أساليب مدمجة @@ -26,30 +28,33 @@ DataType متبوعة بأقواس مربعة `[]` يزيل العنصر الأخير من مصفوفة ويعود إليه. - `var element = names.pop(); - //element = Emma - var element2 = names.pop(); - //element2 = Sophia -` +```typescript +var element = names.pop(); +//element = Emma +var element2 = names.pop(); +//element2 = Sophia +``` ### إدفع() يضيف عنصرًا واحدًا أو أكثر إلى نهاية الصفيف ويعود بالطول الجديد للمصفوفة. - `var length = names.push('Tobias'); - // names[] = ['Javier', 'Emma', 'John', 'Sophia', 'Emma', 'Tobias'] - // lenght = 6 - var length2 = names.push('Jack','Lily'); - // names[] = ['Javier', 'Emma', 'John', 'Sophia', 'Emma', 'Tobias','Jack','Lily'] - // lenght2 = 8 -` +```typescript +var length = names.push('Tobias'); +// names[] = ['Javier', 'Emma', 'John', 'Sophia', 'Emma', 'Tobias'] +// lenght = 6 +var length2 = names.push('Jack','Lily'); +// names[] = ['Javier', 'Emma', 'John', 'Sophia', 'Emma', 'Tobias','Jack','Lily'] +// lenght2 = 8 +``` ### عكس() عكس ترتيب الصفيف وإرجاعها - `var reverseNames = names.reverse(); - //reverseNames = ['Emma','Sophia','John','Emma','Javier'] -` +```typescript +var reverseNames = names.reverse(); +//reverseNames = ['Emma','Sophia','John','Emma','Javier'] +``` [المزيد من الطرق والوصف في TutorialsPoint](https://www.tutorialspoint.com/typescript/typescript_arrays.htm) diff --git a/guide/arabic/typescript/boolean-type/index.md b/guide/arabic/typescript/boolean-type/index.md index ce05ee8615..d057366a89 100644 --- a/guide/arabic/typescript/boolean-type/index.md +++ b/guide/arabic/typescript/boolean-type/index.md @@ -6,5 +6,6 @@ localeTitle: اكتب منطقي `boolean` هي قيمة true / false الأساسية لجافا سكريبت. - `let isDone: boolean = false; -` \ No newline at end of file +```typescript +let isDone: boolean = false; +``` \ No newline at end of file diff --git a/guide/arabic/typescript/enums/index.md b/guide/arabic/typescript/enums/index.md index 84b8916608..bd0ac45b39 100644 --- a/guide/arabic/typescript/enums/index.md +++ b/guide/arabic/typescript/enums/index.md @@ -11,17 +11,18 @@ localeTitle: تتضمن التعدادات 1. رقمية 2. سلسلة القائم - `// numeric enum - enum NumericEnum { - numeric1 = 1, - numeric2, - numeric3, - numeric4, - } - - // string based enum - enum StringBasedEnum { - Programming = "is fun", - Pizza = "is good" - } -` \ No newline at end of file +```typescript +// numeric enum +enum NumericEnum { + numeric1 = 1, + numeric2, + numeric3, + numeric4, +} + +// string based enum +enum StringBasedEnum { + Programming = "is fun", + Pizza = "is good" +} +``` \ No newline at end of file diff --git a/guide/arabic/typescript/for-of-loop/index.md b/guide/arabic/typescript/for-of-loop/index.md index f6c286832d..63b6fc3685 100644 --- a/guide/arabic/typescript/for-of-loop/index.md +++ b/guide/arabic/typescript/for-of-loop/index.md @@ -6,11 +6,12 @@ localeTitle: ل .. من حلقة `for..of` loop هي حلقة خاصة في TypeScript والتي يمكنك استخدامها للتكرار من خلال قيم الصفيف. - `let fruits = ['Apple', 'Banana', 'Orange']; - - for (let fruit of fruits) { - console.log(fruit); - } -` +```typescript +let fruits = ['Apple', 'Banana', 'Orange']; + +for (let fruit of fruits) { + console.log(fruit); +} +``` سيكون الناتج الذي ستحصل عليه من الكود أعلاه هو "Apple" و "Banana" و "Orange". نظرًا لعدم تكرار هذا النوع من الحلقات من خلال المؤشرات ، فلن تحصل على "0" و "1" و "2". \ No newline at end of file diff --git a/guide/arabic/typescript/generics/index.md b/guide/arabic/typescript/generics/index.md index 6af40f04cd..9b0f5f2e16 100644 --- a/guide/arabic/typescript/generics/index.md +++ b/guide/arabic/typescript/generics/index.md @@ -16,27 +16,29 @@ localeTitle: الأدوية ##### المهام - `function printMessage(arg: any): any { - return arg; - } - - // typescript won't complain because the argument type and return type aren't being typed properly - const myMessage: string = printMessage(1); -` +```typescript +function printMessage(arg: any): any { + return arg; +} + +// typescript won't complain because the argument type and return type aren't being typed properly +const myMessage: string = printMessage(1); +``` كما ترى من أعلاه ، فإن تمرير `any` نوع من الوسيطة في الدالة ، بالإضافة إلى نوع الإرجاع ، لا يعد مثاليًا حيث يتم فقد معلومات النوع في العملية. - `// updated example - function printMessage(arg: T): T { - return arg; - } - - // typescript complains because the variable type and the return type of the function don't match - const myMessage: string = printMessage(1); - - // resolve the issue by making sure both types match each other - const myMessage: number = printMessage(1); -` +```typescript +// updated example +function printMessage(arg: T): T { + return arg; +} + +// typescript complains because the variable type and the return type of the function don't match +const myMessage: string = printMessage(1); + +// resolve the issue by making sure both types match each other +const myMessage: number = printMessage(1); +``` إن تضمين `` مع الدالة يخبر TypeScript أنه عام ، وأن تمرير ذلك كمرجع سيجعل TypeScript يعلم أن القيم المرتبطة به من نفس النوع. diff --git a/guide/arabic/typescript/installation/index.md b/guide/arabic/typescript/installation/index.md index 425347fc7b..4bb8201364 100644 --- a/guide/arabic/typescript/installation/index.md +++ b/guide/arabic/typescript/installation/index.md @@ -14,8 +14,9 @@ localeTitle: التركيب سيقوم هذا الأمر بتثبيت حزمة TypeScript كاعتمادية في مشروعك باستخدام [`npm`](https://www.npmjs.com/) وهو مدير حزم شائع. - `npm i typescript -` +```bash +npm i typescript +``` _ملاحظة:_ هناك [عدة خيارات](https://docs.npmjs.com/cli/install) `npm` حسب المكان الذي تريد تثبيت TypeScript فيه. @@ -28,15 +29,17 @@ _ملاحظة:_ هناك [عدة خيارات](https://docs.npmjs.com/cli/instal ### تجميع ملف واحد لأسفل إلى جافا سكريبت - `tsc multiplication.ts -` +```bash +tsc multiplication.ts +``` _إلى ملاحظة_ يمكنك تكوين عملية تجميع TypeScript هذه كبرنامج نصي npm مخصص في `package.json` الخاص بك. ### خيارات الإعداد - `touch tsconfig.json -` +```bash +touch tsconfig.json +``` هناك أيضًا خيار إنشاء ملف [`tsconfig.json`](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) يحدد ملفات الجذر وخيارات المترجم. @@ -52,32 +55,34 @@ _إلى ملاحظة_ يمكنك تكوين عملية تجميع TypeScript ه > `multiplication.ts` - `let a: number = 10; - let b: number = 2; - - function showProduct(first: number, second: number): void { - console.info("Mathematical! The result is " + first * second + "."); - } - - showProduct(a, b); - - // Mathematical! The result is 20. -` +```typescript +let a: number = 10; +let b: number = 2; + +function showProduct(first: number, second: number): void { + console.info("Mathematical! The result is " + first * second + "."); +} + +showProduct(a, b); + +// Mathematical! The result is 20. +``` وبمجرد أن تنتهي من إنشاء `multiplication.ts` ، ويمكنني أن ترجمة ذلك الى جافا سكريبت باستخدام `tsc` القيادة التي تقف على ترجمة نسخة مطبوعة على الآلة الكاتبة. > `multiplication.js` - `var a = 10; - var b = 2; - - function showProduct(first, second) { - console.info("Mathematical! The result is " + first * second + "."); - } - - showProduct(a, b); - - // Mathematical! The result is 20. -` +```javascript +var a = 10; +var b = 2; + +function showProduct(first, second) { + console.info("Mathematical! The result is " + first * second + "."); +} + +showProduct(a, b); + +// Mathematical! The result is 20. +``` بام - لقد جمعت بنجاح TypeScript إلى JavaScript! \ No newline at end of file diff --git a/guide/arabic/typescript/linter/index.md b/guide/arabic/typescript/linter/index.md index 4bf3286b8e..b902382835 100644 --- a/guide/arabic/typescript/linter/index.md +++ b/guide/arabic/typescript/linter/index.md @@ -18,5 +18,6 @@ TSLint عبارة عن أداة تحليل ثابتة قابلة للتوسعة سيقوم هذا الأمر بتثبيت حزمة `TSLint` عالميًا باستخدام `npm` ، مدير حزم شائع. - `npm i -g tslint -` \ No newline at end of file +```bash +npm i -g tslint +``` \ No newline at end of file diff --git a/guide/arabic/typescript/never-type/index.md b/guide/arabic/typescript/never-type/index.md index 8adbe9f773..f00fafcf22 100644 --- a/guide/arabic/typescript/never-type/index.md +++ b/guide/arabic/typescript/never-type/index.md @@ -8,19 +8,20 @@ localeTitle: أبدا اكتب النوع `never` هو نوع فرعي من كل نوع ، ويمكن التنازل عنه. ومع ذلك ، لا يوجد نوع هو نوع فرعي أو يمكن التنازل عنه `never` (باستثناء أبداً نفسه). حتى أي شيء لا يمكن التنازل عنه أبداً. - `// Function returning never must have unreachable end point - function error(message: string): never { - throw new Error(message); - } - - // Inferred return type is never - function fail() { - return error("Something failed"); - } - - // Function returning never must have unreachable end point - function infiniteLoop(): never { - while (true) { - } - } -` \ No newline at end of file +```typescript +// Function returning never must have unreachable end point +function error(message: string): never { + throw new Error(message); +} + +// Inferred return type is never +function fail() { + return error("Something failed"); +} + +// Function returning never must have unreachable end point +function infiniteLoop(): never { + while (true) { + } +} +``` \ No newline at end of file diff --git a/guide/arabic/typescript/null-type/index.md b/guide/arabic/typescript/null-type/index.md index 99460cfc81..4c9056cc71 100644 --- a/guide/arabic/typescript/null-type/index.md +++ b/guide/arabic/typescript/null-type/index.md @@ -6,13 +6,15 @@ localeTitle: نوع فارغ في TypeScript ، يحتوي النوع الفارغ على القيم الخالية. Null هي قيم صالحة من كل نوع. - `let u: null = null; -` +```ts +let u: null = null; +``` عند استخدام العلامة - علامة StrictNullChecks ، يتم تعيين null فقط إلى الفراغ ونوعها. - `let s = "foo"; - s = null; // error, 'null' is not assignable to 'string' - let sn: string | null = "bar"; - sn = null; // ok -` \ No newline at end of file +```ts +let s = "foo"; +s = null; // error, 'null' is not assignable to 'string' +let sn: string | null = "bar"; +sn = null; // ok +``` \ No newline at end of file diff --git a/guide/arabic/typescript/number-type/index.md b/guide/arabic/typescript/number-type/index.md index 47a6fc965f..7b1b469386 100644 --- a/guide/arabic/typescript/number-type/index.md +++ b/guide/arabic/typescript/number-type/index.md @@ -6,8 +6,9 @@ localeTitle: نوع الرقم جميع الأرقام في TypeScript هي قيم النقطة العائمة. يدعم TypeScript القيم الحرفية الثنائية والثنائية من ES6. - `let decimal: number = 7; - let hex: number = 0xf00d; - let binary: number = 0b0110; - let octal: number = 0o531; -` \ No newline at end of file +```typescript +let decimal: number = 7; +let hex: number = 0xf00d; +let binary: number = 0b0110; +let octal: number = 0o531; +``` \ No newline at end of file diff --git a/guide/arabic/typescript/string-type/index.md b/guide/arabic/typescript/string-type/index.md index b0cb1322dc..ec83af84df 100644 --- a/guide/arabic/typescript/string-type/index.md +++ b/guide/arabic/typescript/string-type/index.md @@ -6,9 +6,10 @@ localeTitle: نوع السلسلة سلاسل يمكن أن تكون مكتوبة مع `''` علامات الاقتباس المفردة أو `""` علامات اقتباس مزدوجة. كن متسقًا مع شفرتك واختر نمطًا. - `let dog: string = 'Fido'; - let activity: string = "Playing Outside"; -` +```typescript +let dog: string = 'Fido'; +let activity: string = "Playing Outside"; +``` يمكن كتابة السلاسل باستخدام حرفية القالب: @@ -23,29 +24,32 @@ localeTitle: نوع السلسلة مع وظيفة الانقسام ، يمكنك تقسيم السلسلة الخاصة بك عند فاصل محدد. يمكنك تعيين رقم حد ، وهذا يعني عدد الانقسامات التي يتعين عليها فعلها. إرجاع السلسلة splitted في نوع صفيف. - `let names: string = 'Sarah,Lily,John,Paula,Harvey'; - let array: string[] = names.split(','); - //array = ['Sarah','Lily','John','Paula','Harvey'] - let array2: string[] = names.split(',',2); - //array2 = ['Sarah','Lily'] -` +```typescript +let names: string = 'Sarah,Lily,John,Paula,Harvey'; +let array: string[] = names.split(','); +//array = ['Sarah','Lily','John','Paula','Harvey'] +let array2: string[] = names.split(',',2); +//array2 = ['Sarah','Lily'] +``` ### SUBSTR (startAt، طول) تعود هذه الطريقة بسلسلة فرعية ، والتي `startAt` عند حرف `startAt` من السلسلة الأصلية ، ويكون طولها `length` . - `let names: string = 'Harvey Specter'; - let substr: string = names.substr(3,10); - //substr = 'rvey Spect' -` +```typescript +let names: string = 'Harvey Specter'; +let substr: string = names.substr(3,10); +//substr = 'rvey Spect' +``` ### فرعية (startAt، endAt) تشبه هذه الطريقة substr () ، ولكن لها معلمات مختلفة. المعلمة الثانية هي أيضًا فهرس حول السلسلة الأصلية ، وليس رقم طول. - `let names: string = 'Harvey Specter'; - let substring: string = names.substring(3,10); - //substring = 'rvey Spe' -` +```typescript +let names: string = 'Harvey Specter'; +let substring: string = names.substring(3,10); +//substring = 'rvey Spe' +``` [المزيد من الطرق والوصف في TutorialsPoint](https://www.tutorialspoint.com/typescript/typescript_strings.htm) diff --git a/guide/arabic/typescript/tuple-type/index.md b/guide/arabic/typescript/tuple-type/index.md index 6a69bbb369..8b96f35a98 100644 --- a/guide/arabic/typescript/tuple-type/index.md +++ b/guide/arabic/typescript/tuple-type/index.md @@ -6,24 +6,26 @@ localeTitle: نوع المجموعة التعبير عن مصفوفة يعرف فيها عدد محدد من عناصر الأنواع ، ولكن ليس هو نفسه. - `let arr: [string, number]; - - // This is correct - arr = ['Hello', 7]; - - //This is incorrect - arr = [7, 'Hello']; -` +```typescript +let arr: [string, number]; + +// This is correct +arr = ['Hello', 7]; + +//This is incorrect +arr = [7, 'Hello']; +``` عند الوصول إلى عنصر خارج المؤشرات المعروفة ، سيستخدم نوع الاتحاد: - `arr[3] = 'World!' - // OK, 'string' can be assigned to 'string | number' - - // Error, 'boolean' is not a 'string | number' - arr[5] = false; - // Error, 'boolean' is not a 'string | number' -` +```typescript +arr[3] = 'World!' +// OK, 'string' can be assigned to 'string | number' + +// Error, 'boolean' is not a 'string | number' +arr[5] = false; +// Error, 'boolean' is not a 'string | number' +``` ## الخصائص @@ -33,12 +35,13 @@ localeTitle: نوع المجموعة قال هذا العقار ، كم عنصر لديه عنصر. - `let tuple = []; //you can initialize it after the declaration too, not just the method above - tuple[0] = 10; - tuple[1] = 'Mike'; - let number = tuple.length; - //number = 2; -` +```typescript +let tuple = []; //you can initialize it after the declaration too, not just the method above +tuple[0] = 10; +tuple[1] = 'Mike'; +let number = tuple.length; +//number = 2; +``` ## أساليب مدمجة @@ -48,19 +51,21 @@ localeTitle: نوع المجموعة يزيل العنصر الأخير من tuple. - `var tuple = [10,'Emma',11,'Lily',12,'Mike Ross']; - tuple.pop(); - //tuple = [10,'Emma',11,'Lily',12,] - //We popped 'Mike Ross' from the tuple -` +```typescript +var tuple = [10,'Emma',11,'Lily',12,'Mike Ross']; +tuple.pop(); +//tuple = [10,'Emma',11,'Lily',12,] +//We popped 'Mike Ross' from the tuple +``` ### إدفع() يضيف عنصرًا إلى نهاية المجموعة. - `var tuple = [10,'Emma',11,'Lily',12,'Mike Ross']; - tuple.push('Rachel Zane'); - //tuple = [10,'Emma',11,'Lily',12,'Mike Ross','Rachel Zane'] -` +```typescript +var tuple = [10,'Emma',11,'Lily',12,'Mike Ross']; +tuple.push('Rachel Zane'); +//tuple = [10,'Emma',11,'Lily',12,'Mike Ross','Rachel Zane'] +``` [مزيد من المعلومات حول tuples على TutorialsPoint](https://www.tutorialspoint.com/typescript/typescript_tuples.htm) diff --git a/guide/arabic/typescript/undefined-type/index.md b/guide/arabic/typescript/undefined-type/index.md index ab4df17e5e..ceef59fd46 100644 --- a/guide/arabic/typescript/undefined-type/index.md +++ b/guide/arabic/typescript/undefined-type/index.md @@ -6,26 +6,29 @@ localeTitle: نوع غير معرف في TypeScript ، نفس النوع الفارغ ، يكون للنوع غير المحدد قيم غير محددة. غير محددة هي قيم صالحة من كل نوع. - `let u: undefined = undefined; -` +```ts +let u: undefined = undefined; +``` عند استخدام - علامة `--strictNullChecks` ، غير قابل `--strictNullChecks` فقط لإبطال ونوعها. - `let s = "foo"; - s = null; // error, 'null' is not assignable to 'string' - let sn: string | null = "bar"; - sn = null; // ok - - sn = undefined; // error, 'undefined' is not assignable to 'string | null' -` +```ts +let s = "foo"; +s = null; // error, 'null' is not assignable to 'string' +let sn: string | null = "bar"; +sn = null; // ok + +sn = undefined; // error, 'undefined' is not assignable to 'string | null' +``` مع `--strictNullChecks` ، مقياس اختياري تلقائيا بإضافة `| undefined` : - `function f(x: number, y?: number) { - return x + (y || 0); - } - f(1, 2); - f(1); - f(1, undefined); - f(1, null); // error, 'null' is not assignable to 'number | undefined' -` \ No newline at end of file +```ts +function f(x: number, y?: number) { + return x + (y || 0); +} +f(1, 2); +f(1); +f(1, undefined); +f(1, null); // error, 'null' is not assignable to 'number | undefined' +``` \ No newline at end of file diff --git a/guide/arabic/typescript/void-type/index.md b/guide/arabic/typescript/void-type/index.md index cabb8ac9be..129918847c 100644 --- a/guide/arabic/typescript/void-type/index.md +++ b/guide/arabic/typescript/void-type/index.md @@ -7,7 +7,8 @@ localeTitle: نوع الفراغ لا ينبغي أن تستخدم للمتغيرات ، واستخدام `null` أو `undefined` . ومع ذلك ، استخدمها للوظائف التي لا تعرض قيمة. - `const greeting(): void { - alert('Hello, and Welcome to My Webpage!'); - } -` \ No newline at end of file +```typescript +const greeting(): void { + alert('Hello, and Welcome to My Webpage!'); +} +``` \ No newline at end of file diff --git a/guide/arabic/typography/font-weight-and-style/index.md b/guide/arabic/typography/font-weight-and-style/index.md index db393a6b29..0a2be8625d 100644 --- a/guide/arabic/typography/font-weight-and-style/index.md +++ b/guide/arabic/typography/font-weight-and-style/index.md @@ -6,15 +6,17 @@ localeTitle: وزن الخط والنمط يمكن كتابة خط الوزن على هيئة قيم نصية: - `font-weight: normal; - font-weight: bold; -` +``` +font-weight: normal; +font-weight: bold; +``` أو كقيمة رقمية من `100` إلى `900` (بمضاعفات 100): - `font-weight: 400; /* equal to 'normal' above */ - font-weight: 700; /* equal to 'bold' above */ -` +``` +font-weight: 400; /* equal to 'normal' above */ +font-weight: 700; /* equal to 'bold' above */ +``` القيمة العددية ووصفها المشترك @@ -24,6 +26,7 @@ localeTitle: وزن الخط والنمط يمكن أيضًا تحديد وزن الخط بالنسبة إلى أصل أحد العناصر (إذا كان الخط يحتوي على أكثر من وزن): - `font-weight: lighter; - font-weight: bolder; -` \ No newline at end of file +``` +font-weight: lighter; +font-weight: bolder; +``` \ No newline at end of file diff --git a/guide/arabic/typography/point-size/index.md b/guide/arabic/typography/point-size/index.md index d4f38a624b..da2bd5a882 100644 --- a/guide/arabic/typography/point-size/index.md +++ b/guide/arabic/typography/point-size/index.md @@ -8,14 +8,15 @@ localeTitle: حجم النقطة في نوع المعدن ، يشير حجم النقطة إلى ارتفاع الجسم المعدني الذي يتم صب شخصية الخط. في الخطوط الرقمية ، يتم استبدال الجسم المعدني بصندوق غير مرئي يعرف باسم _مربع em_ . كل حرف يناسب داخل مربع em أو مربع em. **حجم em للخط يساوي حجم النقطة.** - `html{ - font-size:16px; - } - - body{ - font-size:1em; // 1em is equal to 16px - } -` +```css +html{ + font-size:16px; +} + +body{ + font-size:1em; // 1em is equal to 16px +} +``` كما يتم استخدام حجم النقطة لقياس المسافة بين السطور (خط الطول) وطول الخط وعناصر أخرى ، بغض النظر عن حجم الخط. في الخطوط الرقمية ، **نقطة واحدة تساوي 1/72 من البوصة** . اثنا عشر نقطة تجعل واحدة بيكا. ستة بيكا تجعل بوصة واحدة. الطريقة الشائعة لتمثيل picas والنقاط هي كما يلي: diff --git a/guide/arabic/typography/where-to-get-fonts/index.md b/guide/arabic/typography/where-to-get-fonts/index.md index 78d7a0adfd..88dc77190d 100644 --- a/guide/arabic/typography/where-to-get-fonts/index.md +++ b/guide/arabic/typography/where-to-get-fonts/index.md @@ -10,14 +10,15 @@ localeTitle: من أين احصل على الخطوط تتيح لك المواقع مثل Font Squirrel تنزيل ملفات الخطوط التي اخترتها. بمجرد الانتهاء من ذلك ، يجب عليك تحميلها على الخادم الذي يستضيف موقع الويب الخاص بك. لاستخدامها ، تحتاج بعد ذلك إلى إعلانها في ورقة أنماط CSS الخاصة بك ، مما يعني إخبار CSS الخاص بك أن تطلب من متصفح المستخدم عرضه. يتم عادةً إعداد خط باستخدام `@font-face` أعلى ورقة أنماط CSS. - `@font-face { - font-family: "My Super Awesome Open Sans Font"; /* name that you will use later to apply the font */ - src: url("/fontfolder/open-sans.woff"); /* path to the file */ - } - body { - font-family: "My Super Awesome Open Sans Font"; - } -` +```css +@font-face { + font-family: "My Super Awesome Open Sans Font"; /* name that you will use later to apply the font */ + src: url("/fontfolder/open-sans.woff"); /* path to the file */ +} +body { + font-family: "My Super Awesome Open Sans Font"; +} +``` لاحظ أنه يمكنك أيضًا تحديد تنسيق الخط وفقًا لتوافق المستعرض كما يلي. @@ -33,21 +34,22 @@ localeTitle: من أين احصل على الخطوط لاستخدام Google Fonts ، استعرض [الموقع](https://fonts.google.com/) للعثور على الخط الذي يناسب مشروعك. بمجرد اختيارك ، انقر فوق علامة زائد (+) الموجودة بجوار الخط. سيظهر شريط في أسفل الشاشة. انقر عليه. سيتم بعد ذلك منحك عدة أسطر من الشفرة. انسخ والصق سطر HTML في رأس ملف HTML الخاص بك فوق الملف الموجود جزء. ثم خذ CSS واستخدمه عند الضرورة في ورقة الأنماط. - ` - - - - - - Some text. - - -` +```html + + + + + + Some text. + + +``` - `body{ - font-family: "Inconsolata", monospace; - } -` +```css +body{ + font-family: "Inconsolata", monospace; +} +``` انت انتهيت! لديك بنجاح خطوط جديدة لموقعك. diff --git a/guide/arabic/vim/macros/index.md b/guide/arabic/vim/macros/index.md index 4a03164f4a..4f13cdf38e 100644 --- a/guide/arabic/vim/macros/index.md +++ b/guide/arabic/vim/macros/index.md @@ -12,8 +12,9 @@ localeTitle: وحدات الماكرو لبدء ماكرو ، في الوضع العادي ، اضغط على: - `q -` +```vim +q +``` مثال: `qq` يبدأ ماكرو في السجل `q` ، يبدأ `qs` الماكرو في التسجيل `s` diff --git a/guide/arabic/vim/navigation/index.md b/guide/arabic/vim/navigation/index.md index 1eb190e7eb..567e71c9f8 100644 --- a/guide/arabic/vim/navigation/index.md +++ b/guide/arabic/vim/navigation/index.md @@ -19,24 +19,25 @@ localeTitle: التنقل باختصار: - `h moves one character left - j moves one row down - k moves one row up - l moves one character right - - w moves to the beginning of the next word - b moves to the beginning of the previous word - e moves to the end of the current word - - 0 moves to the beginning of the current line - $ moves to the end of the current line - :n moves to line n (ex. :23 moves to line 23) can also use nG - - ZZ moves to the center of the line your on - H moves to the top of the screen - M moves to the middle of the screen - L moves to the bottom of the screen - - gg moves to the first line in the file - G moves to the last line in the file -` \ No newline at end of file +```vim +h moves one character left +j moves one row down +k moves one row up +l moves one character right + +w moves to the beginning of the next word +b moves to the beginning of the previous word +e moves to the end of the current word + +0 moves to the beginning of the current line +$ moves to the end of the current line +:n moves to line n (ex. :23 moves to line 23) can also use nG + +ZZ moves to the center of the line your on +H moves to the top of the screen +M moves to the middle of the screen +L moves to the bottom of the screen + +gg moves to the first line in the file +G moves to the last line in the file +``` \ No newline at end of file diff --git a/guide/arabic/vim/pathogen/index.md b/guide/arabic/vim/pathogen/index.md index 74e2570ad8..caa503dac9 100644 --- a/guide/arabic/vim/pathogen/index.md +++ b/guide/arabic/vim/pathogen/index.md @@ -10,9 +10,10 @@ localeTitle: العوامل الممرضة قم بتشغيل الأوامر التالية: - `mkdir -p ~/.vim/autoload ~/.vim/bundle && \ - curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim -` +``` +mkdir -p ~/.vim/autoload ~/.vim/bundle && \ +curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim +``` * * * @@ -20,15 +21,17 @@ localeTitle: العوامل الممرضة أضف هذا الأمر إلى ملفك .vimrc: - `execute pathogen#infect() -` +``` +execute pathogen#infect() +``` إذا لم يكن لديك أي ملف .vimrc ، اكتب `vim ~/.vimrc` وقم بلصق هذا: - `execute pathogen#infect() - syntax on - filetype plugin indent on -` +``` +execute pathogen#infect() +syntax on +filetype plugin indent on +``` هذا هو مثال أساسي جدا. في هذه اللحظة ، سيتم استخراج كل الإضافات إلى `~/.vim/bundle` وستتم إضافتها إلى _`runtimepath`_ @@ -38,9 +41,10 @@ localeTitle: العوامل الممرضة إذا كنت ترغب في تثبيت مكونات مثل NERDTree ، فقم ببساطة بتشغيل هذا: - `cd ~/.vim/bundle - git clone https://github.com/scrooloose/nerdtree -` +``` +cd ~/.vim/bundle +git clone https://github.com/scrooloose/nerdtree +``` سيتم إضافته إلى \_ `runtimepath` . diff --git a/guide/arabic/voice/index.md b/guide/arabic/voice/index.md index 2afc903c74..e95963f1ea 100644 --- a/guide/arabic/voice/index.md +++ b/guide/arabic/voice/index.md @@ -32,28 +32,29 @@ localeTitle: صوت وها هو JavaScript: - `window.SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition; - - const span = document.querySelector('[data-js="varValue"]'); - const main = document.querySelector('.main'); - const loader = document.querySelector('.loader'); - - const recognition = new SpeechRecognition(); - recognition.lang = 'en-US'; - - recognition.addEventListener('result', e => { - const transcript = Array.from(e.results) - .map(result => result[0].transcript) - - span.textContent = transcript; - loader.textContent = ''; - }); - - recognition.addEventListener('start', () => loader.textContent = 'Listening (enable your microphone)...'); - - recognition.addEventListener('end', recognition.start); - recognition.start(); -` +```javascript +window.SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition; + +const span = document.querySelector('[data-js="varValue"]'); +const main = document.querySelector('.main'); +const loader = document.querySelector('.loader'); + +const recognition = new SpeechRecognition(); +recognition.lang = 'en-US'; + +recognition.addEventListener('result', e => { + const transcript = Array.from(e.results) + .map(result => result[0].transcript) + + span.textContent = transcript; + loader.textContent = ''; +}); + +recognition.addEventListener('start', () => loader.textContent = 'Listening (enable your microphone)...'); + +recognition.addEventListener('end', recognition.start); +recognition.start(); +``` ### اليكسا diff --git a/guide/arabic/xml/index.md b/guide/arabic/xml/index.md index a2ca6a9bba..dc4a07b0b1 100644 --- a/guide/arabic/xml/index.md +++ b/guide/arabic/xml/index.md @@ -8,25 +8,27 @@ localeTitle: لغة الترميز الموسعة (XML) \## تركيب XML يشير بناء جملة XML إلى القواعد التي تحدد كيفية كتابة تطبيق XML. بناء جملة XML بشكل مستقيم جداً ، وهذا يجعل XML سهل التعلم. يجب أن تحتوي مستندات XML على عنصر أساسي واحد هو أصل كل العناصر الأخرى: - ` - - ..... - - -` +``` + + + ..... + + +``` #### يجب أن يكون XML عنصرًا أساسيًا فوق بناء الجملة يظهر العنصر الجذر الذي هو ضروري أثناء إنشاء رمز XML. يمكن إظهار ذلك من خلال المثال: - - ` - - Tove - Jani - Reminder - Don't forget me this weekend! - -` +``` + + + Tove + Jani + Reminder + Don't forget me this weekend! + +``` في هذا المثال ، "note" هو العنصر الجذر.