-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
14 changes: 13 additions & 1 deletion
14
language/zh/www/The_Asset_Editors/Extension_Creation/Android_Extensions.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,32 @@ | ||
{ | ||
"Also see: {}Using Extension Options{}":"另请参阅:{}使用扩展选项{}", | ||
"Android Extensions":"Android 扩展", | ||
"Any code entered into the \"Code Injection\" window will need to be separated into distinct XML groups, as shown in the screenshot above. The XML tag you use for a group will determine where the code is injected into your application.":"任何输入到 \"代码注入 \"窗口的代码都需要被分成不同的XML组,如上面的截图所示。你在组中使用的XML标签将决定代码被注入到你的应用程序的位置。", | ||
"Code Injection":"代码注入", | ||
"Conditional Injection":"条件注入", | ||
"Custom Files":"自定义文件", | ||
"File Injection":"文件注入", | ||
"For information on your creating native extensions for Android, see {}Source Examples{}.":"关于你为Android创建本地扩展的信息,请参见{}示例代码{}。", | ||
"Here you can give the following details:":"在这里,你可以提供以下细节:", | ||
"Inside a code injection group, use {}toInject{} with the required option in {}condition{}:":"在代码注入组中,使用 {}toInject{},并在 {}condition{} 中使用所需选项:", | ||
"Once you have set this up correctly, you will need to add the files required for your extension package to work. To do this you need to click on the buttons at the bottom, either {}Add SDK{} or {}Add Source{} and then browse to the files you wish to add. Added files will be stored in the {}AndroidSource{} directory along with your extension. You can open this location at any time by right clicking {} on the extension and selecting {}Open in Explorer{}.":"一旦你设置正确,你将需要添加你的扩展包工作所需的文件。要做到这一点,你需要点击底部的按钮,{}添加SDK{}或{}添加源代码{},然后浏览你想添加的文件。添加的文件将和你的扩展名一起存储在{}Android Source{}目录中。你可以在任何时候通过右键点击{} 扩展名,选择{}在资源管理器中打开{},来打开这个位置。", | ||
"Source Files":"源文件", | ||
"The following tags are available for the Android platform:":"以下标签可用于安卓平台。", | ||
"The functions and constants are added using {}placeholder {}files to group them together, so you\u0027d add a placeholder and then define the functions and macros as explained in the previous section. To add the rest of the files though you would need to first tick the {}Android {}check-box in the {}Extra Platforms{} section of the editor, which will open up the extension\u0027s Android Properties:":"函数和常量是用{}占位符{}文件来添加的,所以你要添加一个占位符,然后按照上一节的解释定义函数和宏。要添加其余的文件,你需要首先在编辑器的{}Extra Platforms{} 部分勾选{}Android {}check-box,这将打开扩展的Android属性。", | ||
"The runtime location where the code is injected will depend on the type of the tag:":"注入代码的运行时位置取决于标记的类型:", | ||
"The {}${YYAndroidMyInjectionTag}{} part here will be replaced with the contents of the {}<YYAndroidMyInjectionTag> </YYAndroidMyInjectionTag>{} group from the extension\u0027s Code Injection window.":"此处的 {}${YYAndroidMyInjectionTag}{} 部分将替换为扩展的代码注入窗口中的 {}<YYAndroidMyInjectionTag> </YYAndroidMyInjectionTag>{}", | ||
"This will only inject the code between the {}toInject{} tags when the option {}YYEXTOPT_MyExtension_ShouldInject{} is equal to {}\"FooBar\"{}. This allows you to match against a value of any type, as this check is done at compile time when all extension option values are provided as strings.":"当选项 {}YYEXTOPT_MyExtension_ShouldInject{} 等于 {}\"FooBar\"{} 时,这将仅在 {}toInject{} 标记之间注入代码。这允许您匹配任何类型的值,因为当所有扩展选项值都作为字符串提供时,此检查将在编译时完成。", | ||
"This will only inject the code between the {}toInject{} tags when the option {}YYEXTOPT_MyExtension_ShouldInject{} is {}true{}. The option should be of the {}Boolean{} type.":"这将仅在选项 {}YYEXTOPT_MyExtension_ShouldInject{} 为 {}true{} 时在 {}toInject{} 标记之间注入代码。该选项应为 {}Boolean{} 类型。", | ||
"To create an extension for Android you have to do it in two parts. The first part would be to add the extension itself, along with the required files, and the second is to create the functions and macros/constants that the extension requires.":"要为Android创建一个扩展,你必须分两部分进行。第一部分是添加扩展本身,以及所需的文件,第二部分是创建扩展所需的函数和宏/常量。", | ||
"Usage Tips":"使用提示", | ||
"You can also check against a specific value by specifying it in the {}match{} attribute:":"您还可以通过在 {}match{} 属性中指定特定值来检查该值:", | ||
"You can create a folder called \"ProjectFiles\" in the folder of your extension (alongside its {}.yy{} file). Any files placed in this folder will be moved to the root of the generated Android project at compile time, and can also take injection tags as described above.":"您可以在扩展名的文件夹中创建一个名为 \"ProjectFiles\" 的文件夹 (与其 {}.yy{} 文件一起)。放置在此文件夹中的任何文件将在编译时移动到生成的 Android 项目的根目录,并且还可以如上所述地使用注入标记。", | ||
"You can inject code conditionally, depending on the value of one of the {}Extension Options{}.":"您可以有条件地注入代码,具体取决于{}扩展选项{}之一的值。", | ||
"You can use the following syntax to create code injection groups:":"你可以使用以下语法来创建代码注入组。", | ||
"You can use {}YYAndroidLogcat{} to use custom logging tags with {}Logcat{}. Set up your tag with a priority level, e.g.:{} {} {}<YYAndroidLogcat>{}{} {}myDebugTag:V{}{} {}</YYAndroidLogcat>{}{} {} In your extension, use a logging function to log a message with this tag, e.g. {}Log.i(\"myDebugTag\", \"Hello World\");{} ":"您可以使用 {}YYAndroidLogcat{}将自定义日志标签与 {}Logcat{} 一起使用。设置您的标签的优先级,例如:{} {} {}<YYAndroidLogcat>{}{} {}myDebugTag:V{}{} {}</YYAndroidLogcat>{}{} {} \n在您的扩展中,使用日志记录功能记录带有此标签的消息,例如{}Log.i(\"myDebugTag\", \"Hello World\");{} ", | ||
"{}Android Permissions{}: Here you can add in any extra permissions that your extension requires. What these permissions are will depend entirely on the use that the extension has, and so you should {}check the documentation supplied by Google{} for the Android platform, or, if you are using a third party SDK, the documentation that comes with the SDK. To add a new permission you need to click on the {} button to add a placeholder permission, and then do a double {} click on that to edit it to what is required. You can remove permissions using the {} button.":"{}Android 权限{}:在这里,你可以添加你的扩展需要的任何额外权限。这些权限完全取决于扩展的用途,因此你应该检查{}谷歌提供的安卓平台的文档{},或者,如果你使用的是第三方SDK,则是SDK附带的文档。要添加一个新的权限,你需要点击{} 按钮来添加一个占位符权限,然后在上面做双击{} ,将其编辑成所需的内容。你可以使用{} 按钮删除权限。", | ||
"{}Class Name{}: Your extension can have multiple classes, with each class having its own functions and constants, so you should give it a name that reflects its purpose.":"{}类名{} : 您的扩展可以有多个类,每个类都有自己的函数和常量,所以您应该给它一个反映其用途的名称。", | ||
"{}Code Injection{}: Here you can add any code to be injected (added) into your Android application when your game is built for testing or final release. Make sure to revise this (and your permissions) carefully before submitting any games to the store, as incorrect settings will cause your game to be failed for submission. See the section below for more information.":"{}代码注入{}:在这里你可以添加任何代码,以便在你的游戏被构建为测试或最终发布时注入(添加)到你的Android应用程序中。在向商店提交任何游戏之前,请确保仔细修改这个(和你的权限),因为不正确的设置会导致你的游戏提交失败。更多信息见下面的章节。", | ||
"{}NOTE{} These paths are only for VM; for YYC, injected code will go into the {}{RUNTIME}\\yyc\\{} directory, where the paths may or may not be equivalent to those for VM.":"{}注意{} 这些路径仅适用于VM;对于YYC,注入的代码将进入{}{RUNTIME}/yyc{}目录,其中的路径可能与VM的路径不同。" | ||
"{}NOTE{} These paths are only for VM; for YYC, injected code will go into the {}{RUNTIME}\\yyc\\{} directory, where the paths may or may not be equivalent to those for VM.":"{}注意{} 这些路径仅适用于VM;对于YYC,注入的代码将进入{}{RUNTIME}/yyc{}目录,其中的路径可能与VM的路径不同。", | ||
"{}{}IMPORTANT{}{} You can create your own tags for this use. Such custom tags must start with {}YYAndroid{}.":"{}{}重要{}{} 您可以为此创建自己的标签。此类自定义标签必须以 {}YYAndroid{} 开头。" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.