You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cognitive-services/Translator/prevent-translation.md
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ manager: nitinme
8
8
ms.service: cognitive-services
9
9
ms.subservice: translator-text
10
10
ms.topic: conceptual
11
-
ms.date: 11/21/2019
11
+
ms.date: 03/20/2020
12
12
ms.author: swmachan
13
13
---
14
14
@@ -17,9 +17,8 @@ ms.author: swmachan
17
17
The Translator Text API allows you to tag content so that it isn't translated. For example, you may want to tag code, a brand name, or a word/phrase that doesn't make sense when localized.
18
18
19
19
## Methods for preventing translation
20
-
1. Escape to a Twitter tag @somethingtopassthrough or #somethingtopassthrough. Un-escape after translation. This is the regular expression for valid twitter tags: `\B@[A-Za-z]+[A-Za-z0-9_]+)`. A tag should start with a "@" sign, followed by a character and then followed by one or many characters, digits or underscore. It is recommended to keep tags short and the opening tag must be preceded by a space.
21
20
22
-
2. Tag your content with `notranslate`. It's by design that this works only when the input textType is set as HTML
21
+
1. Tag your content with `notranslate`. It's by design that this works only when the input textType is set as HTML
23
22
24
23
Example:
25
24
@@ -33,11 +32,11 @@ The Translator Text API allows you to tag content so that it isn't translated. F
33
32
<div>This will be translated. </div>
34
33
```
35
34
36
-
3. Use the [dynamic dictionary](dynamic-dictionary.md) to prescribe a specific translation.
35
+
2. Use the [dynamic dictionary](dynamic-dictionary.md) to prescribe a specific translation.
37
36
38
-
4. Don't pass the string to the Translator Text API for translation.
37
+
3. Don't pass the string to the Translator Text API for translation.
39
38
40
-
5. Custom Translator: Use a [dictionary in Custom Translator](custom-translator/what-is-dictionary.md) to prescribe the translation of a phrase with 100% probability.
39
+
4. Custom Translator: Use a [dictionary in Custom Translator](custom-translator/what-is-dictionary.md) to prescribe the translation of a phrase with 100% probability.
Copy file name to clipboardExpand all lines: articles/cognitive-services/Translator/reference/v3-0-translate.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ manager: nitinme
9
9
ms.service: cognitive-services
10
10
ms.subservice: translator-text
11
11
ms.topic: reference
12
-
ms.date: 11/12/2019
12
+
ms.date: 03/20/2020
13
13
ms.author: swmachan
14
14
---
15
15
@@ -475,14 +475,15 @@ The response is:
475
475
The alignment information starts with `0:2-0:1`, which means that the first three characters in the source text (`The`) map to the first two characters in the translated text (`La`).
476
476
477
477
#### Limitations
478
-
Note the following restrictions:
478
+
Obtaining alignment information is an experimental feature that we have enabled for prototyping research and experiences with potential phrase mappings. We may choose to stop supporting this in the future. Here are some of the notable restrictions where alignments are not supported:
479
479
480
480
* Alignment is not available for text in HTML format i.e., textType=html
481
481
* Alignment is only returned for a subset of the language pairs:
482
482
- from English to any other language;
483
483
- from any other language to English except for Chinese Simplified, Chinese Traditional, and Latvian to English;
484
484
- from Japanese to Korean or from Korean to Japanese.
485
485
* You will not receive alignment if the sentence is a canned translation. Example of a canned translation is "This is a test", "I love you" and other high frequency sentences.
486
+
* Alignment is not available when you apply any of the approaches to prevent translation as described [here](../prevent-translation.md)
- Only the AZ modules 'Az.Accounts' and 'Az.Resources' are required.
54
+
- Only the AZ modules 'Az.Accounts' and 'Az.Resources' are required.
58
55
59
56
### Install the module
60
57
@@ -76,29 +73,29 @@ To install the **GuestConfiguration** module in PowerShell:
76
73
77
74
## Background information regarding Guest Configuration artifacts and policy for Linux
78
75
79
-
Even in Linux environments, Guest Configuration utilizes Desired State Configuration as a language abstraction.
80
-
The implementation is based in native code (C++) so it does not require loading PowerShell at this time.
81
-
However, it does require a configuration MOF file describing basic details about the environment. DSC is acting as a "wrapper" for InSpec to standardize how it is executed, how parameters are provided from Azure Resource Manager, and how output is captured and returned to the service.
82
-
Little knowledge of DSC is required
83
-
when working with custom InSpec content.
76
+
Even in Linux environments, Guest Configuration utilizes Desired State Configuration as a language
77
+
abstraction. The implementation is based in native code (C++) so it doesn't require loading
78
+
PowerShell at this time. However, it does require a configuration MOF file describing basic details
79
+
about the environment. DSC is acting as a "wrapper" for InSpec to standardize how it's executed, how
80
+
parameters are provided from Azure Resource Manager, and how output is captured and returned to the
81
+
service. Little knowledge of DSC is required when working with custom InSpec content.
84
82
85
83
#### Configuration requirements
86
84
87
-
The only requirement for Guest Configuration to use a custom configuration file is for the name of the
88
-
configuration to be consistent everywhere it's used. This name requirement includes the name of the
89
-
.zip file for the content package, the configuration name in the MOF file stored inside the content
90
-
package, and the configuration name used in a Resource Manager template as the guest assignment
91
-
name.
85
+
The only requirement for Guest Configuration to use a custom configuration file is for the name of
86
+
the configuration to be consistent everywhere it's used. This name requirement includes the name of
87
+
the .zip file for the content package, the configuration name in the MOF file stored inside the
88
+
content package, and the configuration name used in a Resource Manager template as the guest
89
+
assignment name.
92
90
93
91
### Custom Guest Configuration configuration on Linux
94
92
95
-
Guest Configuration on Linux uses the `ChefInSpecResource` resource to
96
-
provide the engine with the name of the [InSpec profile](https://www.inspec.io/docs/reference/profiles/). **Name**
97
-
is the only required resource property. Create a YaML file and a Ruby script file, as detailed below.
93
+
Guest Configuration on Linux uses the `ChefInSpecResource` resource to provide the engine with the
94
+
name of the [InSpec profile](https://www.inspec.io/docs/reference/profiles/). **Name** is the only
95
+
required resource property. Create a YaML file and a Ruby script file, as detailed below.
98
96
99
-
First, create the YaML file used by InSpec.
100
-
The file provides basic information about the environment.
101
-
An example is given below:
97
+
First, create the YaML file used by InSpec. The file provides basic information about the
98
+
environment. An example is given below:
102
99
103
100
```YaML
104
101
name: linux-path
@@ -123,8 +120,8 @@ end
123
120
124
121
Save this file in a new folder named `controls` inside the `linux-path` directory.
125
122
126
-
Finally, create a configuration, import the **GuestConfiguration**
127
-
resource module, and use the `ChefInSpecResource` resource to set the name of the InSpec profile.
123
+
Finally, create a configuration, import the **GuestConfiguration** resource module, and use the
124
+
`ChefInSpecResource`resource to set the name of the InSpec profile.
128
125
129
126
```powershell
130
127
# Define the configuration and import GuestConfiguration
The `Node AuditFilePathExists` command is not technically required but it produces a file named `AuditFilePathExists.mof` rather than the default, `localhost.mof`. Having the .mof file name follow the configuration makes it easy to organize many files when operating at scale.
145
+
The `Node AuditFilePathExists` command isn't technically required but it produces a file named
146
+
`AuditFilePathExists.mof`rather than the default, `localhost.mof`. Having the .mof file name follow
147
+
the configuration makes it easy to organize many files when operating at scale.
149
148
150
149
You should now have a project structure as below:
151
150
@@ -159,10 +158,11 @@ You should now have a project structure as below:
159
158
linux-path.rb
160
159
```
161
160
162
-
The supporting files must be packaged together. The completed package is
163
-
used by Guest Configuration to create the Azure Policy definitions.
161
+
The supporting files must be packaged together. The completed package is used by Guest Configuration
162
+
to create the Azure Policy definitions.
164
163
165
-
The `New-GuestConfigurationPackage` cmdlet creates the package. Parameters of the `New-GuestConfigurationPackage` cmdlet when creating Linux content:
164
+
The `New-GuestConfigurationPackage` cmdlet creates the package. Parameters of the
165
+
`New-GuestConfigurationPackage` cmdlet when creating Linux content:
166
166
167
167
- **Name**: Guest Configuration package name.
168
168
- **Configuration**: Compiled configuration document full path.
@@ -186,7 +186,8 @@ module includes a cmdlet `Test-GuestConfigurationPackage` that loads the same ag
186
186
development environment as is used inside Azure machines. Using this solution, you can perform
187
187
integration testing locally before releasing to billed cloud environments.
188
188
189
-
Since the agent is actually evaluating the local environment, in most cases you need to run the Test- cmdlet on the same OS platform as you plan to audit.
189
+
Since the agent is actually evaluating the local environment, in most cases you need to run the
190
+
Test- cmdlet on the same OS platform as you plan to audit.
190
191
191
192
Parameters of the `Test-GuestConfigurationPackage` cmdlet:
192
193
@@ -208,7 +209,9 @@ The cmdlet also supports input from the PowerShell pipeline. Pipe the output of
The next step is to publish the file to blob storage. The script below contains a function you can use to automate this task. The commands used in the `publish` function require the `Az.Storage` module.
212
+
The next step is to publish the file to blob storage. The script below contains a function you can
213
+
use to automate this task. The commands used in the `publish` function require the `Az.Storage`
214
+
module.
212
215
213
216
```azurepowershell-interactive
214
217
function publish {
@@ -339,12 +342,14 @@ means that the values in the MOF file in the package don't have to be considered
339
342
override values are provided through Azure Policy and don't impact how the Configurations are
340
343
authored or compiled.
341
344
342
-
With InSpec, parameters are typically handled as input either at runtime or as code using attributes.
343
-
Guest Configuration obfuscates this process so input can be provided to Azure Resource Manager when policy is assigned.
344
-
An attributes file is automatically created within the machine. You do not need to create and add a file in your project.
345
-
There are two steps to adding parameters to your Linux audit project.
345
+
With InSpec, parameters are typically handled as input either at runtime or as code using
346
+
attributes. Guest Configuration obfuscates this process so input can be provided to Azure Resource
347
+
Manager when policy is assigned. An attributes file is automatically created within the machine. You
348
+
don't need to create and add a file in your project. There are two steps to adding parameters to
349
+
your Linux audit project.
346
350
347
-
Define the input in the Ruby file where you script what to audit on the machine. An example is given below.
351
+
Define the input in the Ruby file where you script what to audit on the machine. An example is given
352
+
below.
348
353
349
354
```Ruby
350
355
attr_path = attribute('path', description:'The file path to validate.')
@@ -359,7 +364,8 @@ parameter named **Parameters**. This parameter takes a hashtable definition incl
359
364
about each parameter and automatically creates all the required sections of the files used to create
360
365
each Azure Policy definition.
361
366
362
-
The following example creates an Azure Policy to audit a file path, where the user provides the path at the time of Policy assignment.
367
+
The following example creates an Azure Policy to audit a file path, where the user provides the path
0 commit comments