Skip to content

Commit 87eeba7

Browse files
alks801rigor789
authored andcommitted
initial RU translations
* fixing path slash for windows * RU lang in index, indeex_ru.ejs * RU - introduction * intro fixes * RU quick start * RU - installation * RU templates * docs/ru/getting-started/5-nativescript-plugins * docs/ru/getting-started/6-vue-plugins * docs/ru/getting-started/2-playground-tutrial Part 1 * ru/getting-started//-playground-tutorial * little typo fixes * link fixes
1 parent 005d444 commit 87eeba7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+3038
-1
lines changed

build/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Metalsmith(cwd)
4141
'en': 'English',
4242
'ko': '한국어',
4343
'pt-BR': 'Português do Brasil',
44+
'ru': 'Русский'
4445
},
4546
home(current) {
4647
const locale = current.locale || this.defaultLocale;
@@ -113,7 +114,7 @@ Metalsmith(cwd)
113114
})
114115
.use(locales({
115116
defaultLocale: 'en',
116-
locales: ['en', 'ko', 'pt-BR']
117+
locales: ['en', 'ko', 'pt-BR', 'ru']
117118
}))
118119
.use(order())
119120
.use(categories())

build/plugins/locales.js

+5
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,16 @@ function plugin(opts) {
1414
const defaultLocale = meta.defaultLocale = opts.defaultLocale;
1515
const locales = meta.locales = opts.locales;
1616

17+
const isWin = process.platform === "win32";
18+
1719
// creates a pattern for the given locales
1820
const pattern = (locales) => {
1921
if (!Array.isArray(locales)) {
2022
locales = [locales]
2123
}
24+
if (isWin) {
25+
return new RegExp(`.*\\\\(${locales.join('|')})\\\\(.+)(\\..+)`)
26+
}
2227
return new RegExp(`.*\\/(${locales.join('|')})\\/(.+)(\\..+)`)
2328
};
2429

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: ActionBar
3+
apiRef: https://docs.nativescript.org/api-reference/classes/_ui_action_bar_.actionbar
4+
contributors: [rigor789, eddyverbruggen]
5+
---
6+
7+
The ActionBar component is a NativeScript abstraction for the Android ActionBar and iOS NavigationBar.
8+
9+
---
10+
11+
#### Using a title
12+
13+
```html
14+
<ActionBar title="MyApp" />
15+
```
16+
17+
#### Using a custom title view
18+
19+
```html
20+
<ActionBar>
21+
<StackLayout orientation="horizontal">
22+
<Image src="res://icon" width="40" height="40" verticalAlignment="center" />
23+
<Label text="ativeScript" fontSize="24" verticalAlignment="center" />
24+
</StackLayout>
25+
</ActionBar>
26+
```
27+
28+
#### Setting an App Icon for Android
29+
30+
```html
31+
<ActionBar title="My App" android.icon="res://icon" android.iconVisibility="always" />
32+
```
33+
34+
#### Removing the border
35+
On iOS and Android a little border is drawn at the bottom of the ActionBar.
36+
Furthermore, the background color of the ActionBar on iOS is slightly different to what you specify
37+
because iOS applies a filter. To remove this filter and the border, set `flat` to `true`.
38+
39+
```html
40+
<ActionBar title="My App" flat="true" />
41+
```
42+
43+
## Props
44+
45+
| name | type | description |
46+
|------|------|-------------|
47+
| `title` | `String` | The title to be shown in the ActionBar.
48+
| `android.icon` | `String` | The icon to be shown on Android.
49+
| `android.iconVisibility` | `String` | Sets when the icon is visible.
50+
| `flat` | `boolean` | Removes the border and iOS color filter. Default `false`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
title: ActionItem
3+
apiRef: https://docs.nativescript.org/api-reference/classes/_ui_action_bar_.actionitem
4+
contributors: [rigor789]
5+
---
6+
7+
The ActionItem component is used to add additional action buttons to the ActionBar.
8+
9+
---
10+
11+
```html
12+
<ActionBar title="My App">
13+
<ActionItem @tap="onTapShare"
14+
ios.systemIcon="9" ios.position="left"
15+
android.systemIcon="ic_menu_share" android.position="actionBar" />
16+
<ActionItem @tap="onTapDelete"
17+
ios.systemIcon="16" ios.position="right"
18+
text="delete" android.position="popup" />
19+
</ActionBar>
20+
```
21+
22+
#### Conditionally showing action items
23+
24+
ActionItems can be displayed based on a condition using the `v-show` directive.
25+
26+
```html
27+
<ActionBar title="My App">
28+
<ActionItem @tap="onTapEdit"
29+
v-show="!isEditing"
30+
ios.systemIcon="2" ios.position="right"
31+
android.systemIcon="ic_menu_edit" />
32+
<ActionItem @tap="onTapSave"
33+
v-show="isEditing"
34+
ios.systemIcon="3" ios.position="right"
35+
android.systemIcon="ic_menu_save" />
36+
<ActionItem @tap="onTapCancel"
37+
v-show="isEditing"
38+
ios.systemIcon="1"
39+
android.systemIcon="ic_menu_close_clear_cancel" />
40+
</ActionBar>
41+
```
42+
43+
## Props
44+
45+
| name | type | description |
46+
|------|------|-------------|
47+
| `ios.systemIcon` | `String` | Sets the icon for iOS.
48+
| `android.systemIcon` | `String` | Sets the icon for Android.
49+
| `ios.position` | `String` | Sets the position for iOS.<br>Possible values:<br>- `left` (default): Puts the item on the left side of the ActionBar.<br>- `right`: Puts the item on the right side of the ActionBar.
50+
| `android.position` | `String` | Sets the position for Android.<br>Possible values:<br>- `actionBar` (default): Puts the item in the ActionBar.<br>- `popup`: Puts the item in the options menu. Items will be rendered as text.<br>- `actionBarIfRoom`: Puts the item in the ActionBar if there is room for it. Otherwise, puts it in the options menu.
51+
52+
## Events
53+
54+
| name | description |
55+
|------|-------------|
56+
| `tap`| Emitted when the ActionItem has been tapped.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: NavigationButton
3+
apiRef: https://docs.nativescript.org/api-reference/classes/_ui_action_bar_.navigationbutton
4+
contributors: [rigor789]
5+
---
6+
7+
The NavigationButton component is a NativeScript abstraction for the Android navigation button, and the iOS back button.
8+
9+
---
10+
11+
```html
12+
<ActionBar title="My App">
13+
<NavigationButton text="Go back" android.systemIcon="ic_menu_back" @tap="goBack" />
14+
</ActionBar>
15+
```
16+
17+
## Props
18+
19+
| name | type | description |
20+
|------|------|-------------|
21+
| `text` | `String` | Sets the text to be shown on iOS.
22+
| `android.systemIcon` | `String` | The icon to be shown on Android.
23+
24+
*The icon list for Android can be found at <https://developer.android.com/reference/android/R.drawable.html>, and the icons are the ones that start with `ic_` prefix.*
25+
26+
## Events
27+
28+
| name | description |
29+
|------|-------------|
30+
| `tap`| Emitted when the NavigationButton has been tapped.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: ActivityIndicator
3+
apiRef: https://docs.nativescript.org/api-reference/classes/_ui_activity_indicator_.activityindicator
4+
contributors: [MisterBrownRSA, rigor789, ikoevska]
5+
---
6+
7+
`<ActivityIndicator>` is a UI component that shows a progress indicator signaling to the user of an operation running in the background.
8+
9+
---
10+
11+
```html
12+
<ActivityIndicator busy="true" @busyChange="onBusyChanged" />
13+
```
14+
15+
[> screenshots for=ActivityIndicator <]
16+
17+
## Props
18+
19+
| Name | Type | Description |
20+
|------|------|-------------|
21+
| `busy` | `Boolean` | Gets or sets whether the indicator is active. When `true`, the indicator is active.
22+
23+
## Events
24+
25+
| Name | Description |
26+
|------|-------------|
27+
| `busyChange`| Emitted when the `busy` property is changed.
28+
29+
## Native component
30+
31+
| Android | iOS |
32+
|---------|-----|
33+
| [`android.widget.ProgressBar` (indeterminate = true)](https://developer.android.com/reference/android/widget/ProgressBar.html) | [`UIActivityIndicatorView`](https://developer.apple.com/documentation/uikit/uiactivityindicatorview)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: Button
3+
apiRef: https://docs.nativescript.org/api-reference/classes/_ui_button_.button
4+
contributors: [MisterBrownRSA, rigor789, eddyverbruggen, ikoevska]
5+
---
6+
7+
`<Button>` is a UI component that displays a button which reacts to a user gesture.
8+
9+
For more information about the available gestures, see [Gestures in the official NativeScript documentation](https://docs.nativescript.org/ui/gestures).
10+
11+
---
12+
13+
```html
14+
<Button text="Button" @tap="onButtonTap" />
15+
```
16+
17+
[> screenshots for=Button <]
18+
19+
## Props
20+
21+
| Name | Type | Description |
22+
|------|------|-------------|
23+
| `text` | `String` | Sets the label of the button.
24+
| `textWrap` | `Boolean` | Gets or sets whether the widget wraps the text of the label. Useful for longer labels. Default value is `false`.
25+
26+
## Events
27+
28+
| Name | Description |
29+
|------|-------------|
30+
| `tap` | Emitted when the button is tapped.
31+
32+
## Native component
33+
34+
| Android | iOS |
35+
|---------|-----|
36+
| [`android.widget.Button`](https://developer.android.com/reference/android/widget/Button.html) | [`UIButton`](https://developer.apple.com/documentation/uikit/uibutton)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: DatePicker
3+
apiRef: https://docs.nativescript.org/api-reference/classes/_ui_date_picker_.datepicker
4+
contributors: [MisterBrownRSA, rigor789, ikoevska]
5+
---
6+
7+
`<DatePicker>` is a UI component that lets users select a date from a pre-configured range.
8+
9+
See also: [TimePicker](/en/docs/elements/components/time-picker).
10+
11+
---
12+
13+
```html
14+
<DatePicker @loaded="onDatePickerLoaded" @dateChanged="onDateChanged" />
15+
```
16+
17+
`<DatePicker>` provides two-way data binding using `v-model`.
18+
19+
```html
20+
<DatePicker v-model="selectedDate" />
21+
```
22+
23+
[> screenshots for=DatePicker <]
24+
25+
## Props
26+
27+
| Name | Type | Description |
28+
|------|------|-------------|
29+
| `date` | `Date` | Gets or sets the complete date.
30+
| `minDate` | `Date` | Gets or sets the earliest possible date to select.
31+
| `maxDate` | `Date` | Gets or sets the latest possible date to select.
32+
| `day` | `Number` | Gets or sets the day.
33+
| `month` | `Number` | Gets or sets the month.
34+
| `year` | `Number` | Gets or sets the year.
35+
36+
## Events
37+
38+
| Name | Description |
39+
|------|-------------|
40+
| `dateChanged` | Emitted when the selected date changes.
41+
42+
## Native component
43+
44+
| Android | iOS |
45+
|---------|-----|
46+
| [`android.widget.DatePicker`](https://developer.android.com/reference/android/widget/DatePicker.html) | [`UIDatePicker`](https://developer.apple.com/documentation/uikit/uidatepicker)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: HtmlView
3+
apiRef: https://docs.nativescript.org/api-reference/classes/_ui_html_view_.htmlview
4+
contributors: [MisterBrownRSA, rigor789, ikoevska]
5+
---
6+
7+
`<HtmlView>` is a UI component that lets you show static HTML content.
8+
9+
See also: [WebView](/en/docs/elements/components/web-view).
10+
11+
---
12+
13+
```html
14+
<HtmlView html="<div><h1>HtmlView</h1></div>" />
15+
```
16+
17+
[> screenshots for=HtmlView <]
18+
19+
## Props
20+
21+
| Name | Type | Description |
22+
|------|------|-------------|
23+
| `html` | `String` | The HTML content to be shown.
24+
25+
## Native component
26+
27+
| Android | iOS |
28+
|---------|-----|
29+
| [`android.widget.TextView`](https://developer.android.com/reference/android/widget/TextView.html) | [`UITextView`](https://developer.apple.com/documentation/uikit/uitextview)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: Image
3+
apiRef: https://docs.nativescript.org/api-reference/classes/_ui_image_.image
4+
contributors: [MisterBrownRSA, rigor789, ikoevska]
5+
---
6+
7+
`<Image>` is a UI component that shows an image from an [ImageSource](https://docs.nativescript.org/api-reference/modules/_image_source_) or from a URL.
8+
9+
---
10+
11+
#### Displaying an image relative to the `app` directory
12+
13+
```html
14+
<Image src="~/logo.png" stretch="none" />
15+
```
16+
17+
#### Displaying an image from a URL
18+
19+
```html
20+
<Image src="https://art.nativescript-vue.org/NativeScript-Vue-White-Green.png" stretch="none" />
21+
```
22+
23+
#### Displaying an image from `App_Resources`
24+
25+
```html
26+
<Image src="res://icon" stretch="none" />
27+
```
28+
29+
#### Displaying a `base64`-encoded image
30+
31+
```html
32+
<Image src="data:Image/png;base64,iVBORw..." stretch="none" />
33+
```
34+
35+
[> screenshots for=Image <]
36+
37+
## Props
38+
39+
| Name | Type | Description |
40+
|------|------|-------------|
41+
| `src` | `String` or [`ImageSource`](https://docs.nativescript.org/api-reference/modules/_image_source_) | Gets or sets the source of the image as a URL or an image source.
42+
|`imageSource` | [`ImageSource`](https://docs.nativescript.org/api-reference/modules/_image_source_) | Gets or sets the image source of the image.
43+
| `tintColor` | `Color` | (Style property) Sets a color to tint template images.
44+
| `stretch` | `Stretch` | (Style property) Gets or sets the way the image is resized to fill its allocated space.<br/>Valid values: `none`, `aspectFill`, `aspectFit`, or `fill`.<br/>For more information, see [Stretch](https://docs.nativescript.org/api-reference/modules/_ui_enums_.stretch).
45+
| `loadMode` | | Gets or sets the loading strategy for the images on the local file system.<br/>Valid values: `sync` or `async`.<br/>Default value: `async`.<br/>For more information, see [loadMode](https://docs.nativescript.org/api-reference/classes/_ui_image_.image#loadmode).
46+
47+
## Native component
48+
49+
| Android | iOS |
50+
|---------|-----|
51+
| [`android.widget.ImageView`](https://developer.android.com/reference/android/widget/ImageView.html) | [`UIImageView`](https://developer.apple.com/documentation/uikit/uiimageview)

0 commit comments

Comments
 (0)