hudong
2025-06-11 a06049a177a20285013c32fba254a09d1cd3cc48
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
'use strict';
window.SwaggerTranslator = {
    _words: [],
 
    translate: function ()
    {
        var $this = this;
        $('[data-sw-translate]').each(function ()
        {
            $(this).html($this._tryTranslate($(this).html()));
            $(this).val($this._tryTranslate($(this).val()));
            $(this).attr('title', $this._tryTranslate($(this).attr('title')));
        });
    },
 
    setControllerSummary: function ()
    {
        $.ajax({
            type: "get",
            async: true,
            url: $("#input_baseUrl").val(),
            dataType: "json",
            success: function (data)
            {
                var summaryDict = data.ControllerDesc;
                var id, controllerName, strSummary;
                $("#resources_container .resource").each(function (i, item)
                {
                    id = $(item).attr("id");
                    if (id)
                    {
                        controllerName = id.substring(9);
                        strSummary = summaryDict[controllerName];
                        if (strSummary)
                        {
                            $(item).children(".heading").children(".options").first().prepend('<li class="controller-summary" title="' + strSummary + '">' + strSummary + '</li>');
                        }
                    }
                });
            }
        });
    },
    _tryTranslate: function (word)
    {
        return this._words[$.trim(word)] !== undefined ? this._words[$.trim(word)] : word;
    },
 
    learn: function (wordsMap)
    {
        this._words = wordsMap;
    }
};
 
 
/* jshint quotmark: float */
window.SwaggerTranslator.learn({
    "Warning: Deprecated": "¾¯¸æ£ºÒѹýʱ",
    "Implementation Notes": "ʵÏÖ±¸×¢",
    "Response Class": "ÏìÓ¦Àà",
    "Status": "״̬",
    "Parameters": "²ÎÊý",
    "Parameter": "²ÎÊý",
    "Value": "Öµ",
    "Description": "ÃèÊö",
    "Parameter Type": "²ÎÊýÀàÐÍ",
    "Data Type": "Êý¾ÝÀàÐÍ",
    "Response Messages": "ÏìÓ¦ÏûÏ¢",
    "HTTP Status Code": "HTTP ×´Ì¬Âë",
    "Reason": "Ô­Òò",
    "Response Model": "ÏìӦģÐÍ",
    "Request URL": "ÇëÇó URL",
    "Response Body": "ÏìÓ¦Ìå",
    "Response Code": "ÏìÓ¦Âë",
    "Response Headers": "ÏìӦͷ",
    "Hide Response": "Òþ²ØÏìÓ¦",
    "Headers": "Í·",
    "Try it out!": "ÊÔһϣ¡",
    "Show/Hide": "ÏÔʾ/Òþ²Ø",
    "List Operations": "ÏÔʾ²Ù×÷",
    "Expand Operations": "Õ¹¿ª²Ù×÷",
    "Raw": "ԭʼ",
    "can't parse JSON.  Raw result": "ÎÞ·¨½âÎö JSON¡£Ô­Ê¼½á¹û",
    "Model Schema": "Ä£Ðͼܹ¹",
    "Model": "Ä£ÐÍ",
    "apply": "Ó¦ÓÃ",
    "Username": "Óû§Ãû",
    "Password": "ÃÜÂë",
    "Terms of service": "·þÎñÌõ¿î",
    "Created by": "´´½¨Õß",
    "See more at": "²é¿´¸ü¶à£º",
    "Contact the developer": "ÁªÏµ¿ª·¢Õß",
    "api version": "api °æ±¾",
    "Response Content Type": "ÏìÓ¦ Content Type",
    "fetching resource": "ÕýÔÚ»ñÈ¡×ÊÔ´",
    "fetching resource list": "ÕýÔÚ»ñÈ¡×ÊÔ´Áбí",
    "Explore": "ä¯ÀÀ",
    "Show Swagger Petstore Example Apis": "ÏÔʾ Swagger Petstore Ê¾Àý Apis",
    "Can't read from server.  It may not have the appropriate access-control-origin settings.": "ÎÞ·¨´Ó·þÎñÆ÷¶ÁÈ¡¡£¿ÉÄÜûÓÐÕýÈ·ÉèÖàaccess-control-origin¡£",
    "Please specify the protocol for": "ÇëÖ¸¶¨Ð­Ò飺",
    "Can't read swagger JSON from": "ÎÞ·¨¶ÁÈ¡ swagger JSONÓÚ",
    "Finished Loading Resource Information. Rendering Swagger UI": "ÒѼÓÔØ×ÊÔ´ÐÅÏ¢¡£ÕýÔÚäÖȾ Swagger UI",
    "Unable to read api": "ÎÞ·¨¶ÁÈ¡ api",
    "from path": "´Ó·¾¶",
    "server returned": "·þÎñÆ÷·µ»Ø"
});
$(function ()
{
    window.SwaggerTranslator.translate();
    window.SwaggerTranslator.setControllerSummary();
});