CN107479890A - Method and system using different literals display command help information is realized based on Zebra - Google Patents

Method and system using different literals display command help information is realized based on Zebra Download PDF

Info

Publication number
CN107479890A
CN107479890A CN201710701299.7A CN201710701299A CN107479890A CN 107479890 A CN107479890 A CN 107479890A CN 201710701299 A CN201710701299 A CN 201710701299A CN 107479890 A CN107479890 A CN 107479890A
Authority
CN
China
Prior art keywords
help information
order
zebra
command
english
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710701299.7A
Other languages
Chinese (zh)
Other versions
CN107479890B (en
Inventor
齐航
陈鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changsha Xingrong Metadata Technology Co.,Ltd.
Original Assignee
BEIJING ZHONGCHUANG TENGRUI TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BEIJING ZHONGCHUANG TENGRUI TECHNOLOGY Co Ltd filed Critical BEIJING ZHONGCHUANG TENGRUI TECHNOLOGY Co Ltd
Priority to CN201710701299.7A priority Critical patent/CN107479890B/en
Publication of CN107479890A publication Critical patent/CN107479890A/en
Application granted granted Critical
Publication of CN107479890B publication Critical patent/CN107479890B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/453Help systems

Abstract

The invention discloses the method and system realized based on Zebra using different literals display command help information.Methods described includes:Receive with the order for helping parameter;The help information of the order at least how is used using at least one text importing different from English.It can support to carry out command cue using multi-language character, and word switching can be carried out as needed, and the switching for entering line command help information word in same system, between different user does not influence the word that the current order help information of other users is shown.

Description

Based on Zebra realize using different literals display command help information method and System
Technical field
The present invention relates to field of computer technology.Different literals are used more particularly it relates to be realized based on Zebra The method and system of display command help information.
Background technology
Traditional commands line interface, for managing and configuring system.Wherein, the management to system and configuration by one or A plurality of character Command is carried out.Every character Command is made up of one or more keywords (word), and these keywords (word) are generally all It is English character.Based on function or using background, the definition of these keywords (word), implication, description etc., a kind of language can be used, And typically English is described, reaches command word (word) lexical or textual analysis or prompt operator's purpose of input.When user is ordering When some specific operation is performed in row, these indicative descriptions or help information also would indicate that and.
However, for current situation both domestic and external, on the one hand, with the expansion of overseas market, especially those will not For English is as the market of mother tongue, the command description of local language is met by introducing in systems, is realized more local Change characteristic, the overseas market for being more conducive to enterprise is expanded.On the other hand, for the conventional system provider of the country, Duo Shuoqi Industry also and thinks little of the character translation of command line interface, and inside is without professional translator, and the English of system research and development team It is not high to translate level, causes many inconsistent explanation and elaboration to the help information of system command, so as to user's Using bringing many puzzlements.
Zebra provides the virtual terminal VTY (Virtual Terminal) of an order line form.The VTY is similar to Shell, order is received, parsed, calling and language switches etc. can be realized.VTY is initialized according to User Priority And load corresponding command node.Command node stores the order that the user can perform with chain sheet form.When user is in VTY During upper input order, VTY can be received, parsed and identified to order, be found and the order by look-up command node linked list Corresponding function simultaneously performs, and finally echoes operation result to VTY.However, primary Zebra does not support the life using multi-language character The switching between multinational prompt text (that is, language) is less supported in order prompting.
It is, therefore, desirable to provide a kind of scheme solves above-mentioned technical problem.
The content of the invention
Present invention seek to address that above mentioned problem, while the present invention is achieved by the following technical solutions.
According to the method based on Zebra realizations using different literals display command help information of the present invention, including:
Received by VTY with the order for helping parameter;
The help information of the order at least how is used using at least one text importing different from English.
Preferably, when the order help information has used at least two different words, in addition to:
Literal type select command is received, to determine the literal type for display command help information.
Preferably, before receiving with the order for helping parameter, realized based on Zebra and helped using different literals display command The method of supplementary information also includes:
The desc structures definition in Zebra is changed, increase points to the character pointer of non-English help information, increases word Type indicator variable;
Each command word in Zebra increases corresponding non-English and helped under the English help information of order word Information;
Increase non-English help information extraction function;
Cmd_make_descvec functions are changed, the function of non-English help information is extracted in increase;
Vty_describe_command functions are changed, increase the function of being shown to non-English help information;
Increase one or more help information literal type selection functions, for realizing to help information word to be used Type is selected;
By under one or more of help information literal types selection function registration to the public command nodes of Zebra;
Compiling, link, operation, log on command row;
A help information in one or more of help information literal type selection functions is performed under order line Order corresponding to literal type selection function.
According to the system based on Zebra realizations using different literals display command help information of the present invention, including basis The order line virtual terminal of method as discussed above operation.
The advantage of the invention is that:It can support to carry out command cue using multi-language character, and can be as needed Word switching is carried out, while the switching of the word based on VTY will not influence the normal output of other VTY terminals.That is, in same system Enter the switching of line command help information word in system, between different user and do not influence the current order help information of other users to show The word shown.
Brief description of the drawings
By reading the detailed description of following detailed description, it is various other the advantages of and benefit it is common for this area Technical staff will be clear understanding.Accompanying drawing is only used for showing the purpose of embodiment, and is not considered as to the present invention Limitation.And in whole accompanying drawing, identical part is denoted by the same reference numerals.In the accompanying drawings:
Fig. 1 is shown to be helped to believe based on Zebra realizations according to embodiment of the present invention using different literals display command The schematic flow diagram of the method for breath.
Fig. 2 shows the storage organization of the order help information in Zebra.
Fig. 3 is shown to be helped to believe based on Zebra realizations according to embodiment of the present invention using different literals display command The schematic diagram of the embodiment of the system of breath.
Fig. 4 shows the schematic flow diagram of an example embodiment according to embodiment of the present invention.
Embodiment
The illustrative embodiments of the disclosure are more fully described below with reference to accompanying drawings.Although this public affairs is shown in accompanying drawing The illustrative embodiments opened, it being understood, however, that may be realized in various forms the disclosure without the reality that should be illustrated here The mode of applying is limited.Conversely, there is provided these embodiments are to be able to be best understood from the disclosure, and can be by this public affairs The scope opened completely is communicated to those skilled in the art.
Fig. 1 is shown to be helped to believe based on Zebra realizations according to embodiment of the present invention using different literals display command The schematic flow diagram of the method 100 of breath.
As shown in figure 1, the method 100 of display command help information comprises the following steps:
Step S102:Receive with the order for helping parameter.
For example, Zebra systems can receive the order with various parameters that user inputs by its virtual terminal.It is described Order is one or more order words of order line form.
Step S104:At least how the help of the order is used to believe using at least one text importing different from English Breath.
Fig. 2 shows the storage organization of the order help information in Zebra.
As shown in Fig. 2 the help information for being different from English newly increased is that unit is stored with " word ", it is somebody's turn to do " word " It is referred to as token in Zebra systems.As shown in Fig. 2 " word " or token number corresponding to the help information of different command Amount can be different.Such as first in Fig. 2 order CMD1 help information corresponding 3 " words " or token (token1, Token2 and token3), the help information of second order CMD2 in Fig. 2 correspond to n individual " word " or token (token1, Token2 ..., tokenn).
As described above, the help information in existing Zebra systems only has the information of English words type.Therefore, can incite somebody to action Other literal types are replaced or expanded to help information, it may for example comprise but it is not limited to Chinese character, Japanese character, Korean word Symbol etc..
Alternatively, when the order help information has used at least two different words, display command help information Method 100 it is further comprising the steps of:
Step S106:Literal type select command is received, to determine the literal type for display command help information.
, can be with for example, when the order help information has used two kinds of different words of English character and Chinese character Literal type select command is received to select to carry out display command help information using English character or Chinese character.
Alternatively, although being not shown in Fig. 1, however, before receiving with the order for helping parameter, display command helps The method 100 of information is further comprising the steps of:
The desc structures definition in Zebra is changed, increase points to the character pointer of non-English help information, increases word Type indicator variable.
Non- English help information is resolved during order loads registration.Resolution rules be to this help information character by character Scanning is read, and this help information is resolved into one or more " words " using space as separator, is somebody's turn to do " word " described It is referred to as token in system.Then each token is quoted by non-English help information character pointer.
Each command word in Zebra increases corresponding non-English and helped under the English help information of order word Information.
Increase non-English help information extraction function.
Cmd_make_descvec functions are changed, the function of non-English help information is extracted in increase.
Non- English help information is also to be extracted during order loads registration.Extracting rule be to this help information by Character scan is read, and this help information is resolved into one or more " words " using space as separator, is somebody's turn to do " word " and is existed It is referred to as token in the system.Then each token is converted into str_vector and stored in the system to arrive all_ vector.Multiple str_vector are by storage to all_vector.When scanning runs into the end of this help information ' Terminate when 0 ', return to all_vector.All_vector quotes the strvec carried by system.
Vty_describe_command functions are changed, increase the function of being shown to non-English help information.
For example, word output selection Rule of judgment can be increased in vty_describe_command functions, to realize The display of the different literals help information of command word.When the help information literal type that VTY user currently selects for it is English when, should Function exports English help information;When the help information literal type that VTY user currently selects for it is non-English when, the function output Non- English help information.Which kind of non-English help information is specifically switched to, the predefined order of viewing system helps word and control Depending on switching method.Use this method, it is ensured that after the party A-subscriber in same set of system switches display word, do not interfere with B use The word that family is currently shown.
Increase one or more help information literal type selection functions, for realizing to help information word to be used Type is selected.Function is selected to change controls of the current VTY for order help information output character by literal type, To realize the switching between different output characters.
By under one or more of help information literal types selection function registration to the public command nodes of Zebra.
Compiling, link, operation, log on command row.
A help information in one or more of help information literal type selection functions is performed under order line Order corresponding to literal type selection function.
For the method 100 of above-mentioned display command help information, it is also proposed that the system of display command help information, it is wrapped Include the order line virtual terminal operated according to the method 100 of above-mentioned display command help information.
For example, the virtual terminal for the order line form that the order line virtual terminal, which can be Zebra systems, to be provided VTY。
In order that those skilled in the art are more clearly understood that the present invention, described below in conjunction with a specific embodiment According to the above-mentioned technical proposal of the present invention.
Fig. 3 is shown to be helped to believe based on Zebra realizations according to embodiment of the present invention using different literals display command The schematic diagram of the embodiment of the system of breath.
As shown in figure 3, the system of display command help information includes the method 100 according to above-mentioned display command help information The order line virtual terminal (that is, " virtual terminal " in Fig. 3) of operation.
When operator in figure 3 is performed with the order for helping parameter by virtual terminal, virtual terminal can use not How at least one text importing for being same as English uses the help information of the order.The order is one of order line form Or multiple order words.
Other word classes can be replaced or expanded to the help information of English words type in existing Zebra systems Type, it may for example comprise but it is not limited to Chinese character, Japanese character, Korea character etc..
Alternatively, when order line virtual terminal is supported to use at least two different text importing order help informations, Operator can also perform literal type select command by virtual terminal, to determine the word for display command help information Type.For example, as shown in figure 3, order line virtual terminal supports English character or Chinese character both literal types.
, it is necessary to change Zebra source programs, recompilate before the method 100 of above-mentioned display command help information is performed Modified Zebra source programs, the target program of correlation is linked, (function name, log-in command are bright, shell lives for progress in systems Make, help information) between relation registration, and run executable file and (that is, " definition ", " loading " in Fig. 3 and " hold OK ").
Above-described embodiment shown in Fig. 3 is applied to all systems based on Zebra command line interfaces.Wherein, command definition Realize the feedback of the requirement of the input/output argument of order, implementation procedure and implementing result.Order loading realizes will be above-mentioned The Ordered Registration defined uses into system for subsequent execution process.Order execution realizes registered in matching system Order, and run satisfactory order.Virtual terminal line realizes user's input and implementing result displaying.
Specifically the exemplary step of " definition ", " loading " and " execution " is as described below:
With Zebra config_write_file_cmd orders, (system configuration is saved in a text specified by the order In part) exemplified by, to illustrate how to increase Chinese description.Config_write_file_cmd intrinsic Zebra is defined in this way:
Realize that step is as follows:
Step 0, modification structure definition.
The definition of struct vty structures is changed in vty.h, increase language (that is, literal type) switching control switchs, Definition of this method to switch is int language.
Step 1, the English for config_write_file_cmd each command word (word) describe (that is, help information) Lower increase Chinese description.
Step 2, increase Chinese description lattice in command.c with reference to cmd_desc_str (const char**string) Formula interface (that is, function):char*cmd_desc_cstr(const char**string).It is as follows:
Step 3, modification static vector cmd_make_descvec (const char*string, const char * descstr) interface, in desc->Str=cmd_desc_str (&dp) under increase desc->Cstr=cmd_desc_cstr (&dp) perform order.
Step 4, the vty_describe_command interfaces for changing vty.c, the language languages defined according to this programme Speech switch, select the category of language of displaying.It is defined as follows:
Step 5, modification command.c, increase language switching command, and language_chinese_cmd is realized and retouched system Predicate speech switchs to Chinese description, and language_english_cmd realizes switchs to English description by system description language. Language_chinese_cmd and language_english_cmd command definitions are as follows:
Step 6, language_chinese_cmd and language_english_cmd be registered to system share order Under node.
Step 7, compiling, operation, log on command row.
Step 8, perform " chinese " and " english " order respectively under order line, such as input "" ordered with checking Make the switching result of help information word.
Step 9, terminate.
To 8 being only example, these steps can perform the above-mentioned example step 0 of the present invention in other orders, and Can realize it is above-mentioned can support to carry out command cue using multi-language character, and word switching can be carried out as needed, The word based on VTY switches the identical technique effect for the normal output that will not influence other VTY terminals simultaneously.
Fig. 4 shows the schematic flow diagram of an example embodiment according to embodiment of the present invention.
As shown in figure 4, the schematic flow diagram of the example embodiment comprises the following steps:
Step S1:One order is instantiated by DEFUN, and non-English description is specified for each token of the order.It is (right Answer above-mentioned steps 1)
Step S2:The switching command (corresponding above-mentioned steps 5) of help information word output is instantiated by DEFUN.
Step S3:Register examples detailed above order (corresponding above-mentioned steps 6).
Step S4:Struct desc structures are changed, increase non-english descriptive text storage organization (corresponding above-mentioned steps 0)。
Step S5:The parsing of order help information and extraction function are changed, non-english word is stored in the form of token (corresponding above-mentioned steps 2 and step 3).
Step S6:Order help information output function is changed, according to the order help information word of the configuration currently switched Type simultaneously exports (corresponding above-mentioned steps 4).
Step S7:Literal type select command is received, to determine that the literal type for display command help information is (corresponding " performing " chinese " and " english " order respectively under order line " in above-mentioned steps 8).
Step S8:Reception HELP command (in corresponding above-mentioned steps 8 " such as input "””).
Step S9:Show the help information of all orders (in corresponding above-mentioned steps 8 with the literal type being currently configured " with the switching result of viewing command help information word ").
According to the above-mentioned technical proposal of the present invention, the order that order line (for example, Zebra) realizes multi-language character can be based on Help information is prompted, and can carry out word switching as needed.Therefore, above-mentioned technical proposal can realize such as Zebra's The multi-language support of order line and flexibly switching.
, can be as needed using the word of country variant to identical command word according to the above-mentioned technical proposal of the present invention (word) is explained or described, and is flexibly switched as needed, so as to realize the multi-lingual branch to order line description Hold.
It is described above, it is only the exemplary embodiment of the present invention, but protection scope of the present invention is not limited to This, any one skilled in the art the invention discloses technical scope in, the change that can readily occur in or replace Change, should all be included within the scope of the present invention.Therefore, protection scope of the present invention should be with the protection of the claim Scope is defined.

Claims (4)

  1. A kind of 1. method realized based on Zebra using different literals display command help information, it is characterised in that including:
    Received by VTY with the order for helping parameter;
    The help information of the order at least how is used using at least one text importing different from English.
  2. 2. the method according to claim 1 realized based on Zebra using different literals display command help information, it is special Sign is, when the order help information has used at least two different words, in addition to:
    Literal type select command is received, to determine the literal type for display command help information.
  3. 3. being realized based on Zebra according to any one of claim 1 or 2 uses different literals display command help information Method, it is characterised in that receive band help parameter order before, in addition to:
    The desc structures definition in Zebra is changed, increase points to the character pointer of non-English help information, increases literal type Indicator variable;
    Each command word in Zebra increases corresponding non-English and helps to believe under the English help information of order word Breath;
    Increase non-English help information extraction function;
    Cmd_make_descvec functions are changed, the function of non-English help information is extracted in increase;
    Vty_describe_command functions are changed, increase the function of being shown to non-English help information;
    Increase one or more help information literal type selection functions, for realizing to help information literal type to be used Selected;
    By under one or more of help information literal types selection function registration to the public command nodes of Zebra;
    Compiling, link, operation, log on command row;
    A help information word in one or more of help information literal type selection functions is performed under order line Order corresponding to type selecting function.
  4. 4. a kind of system realized based on Zebra using different literals display command help information, it is characterised in that including basis The order line virtual terminal of any one of claims 1 to 3 operation.
CN201710701299.7A 2017-08-16 2017-08-16 Method and system for displaying command help information by using different characters based on Zebra Active CN107479890B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710701299.7A CN107479890B (en) 2017-08-16 2017-08-16 Method and system for displaying command help information by using different characters based on Zebra

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710701299.7A CN107479890B (en) 2017-08-16 2017-08-16 Method and system for displaying command help information by using different characters based on Zebra

Publications (2)

Publication Number Publication Date
CN107479890A true CN107479890A (en) 2017-12-15
CN107479890B CN107479890B (en) 2021-01-01

Family

ID=60599754

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710701299.7A Active CN107479890B (en) 2017-08-16 2017-08-16 Method and system for displaying command help information by using different characters based on Zebra

Country Status (1)

Country Link
CN (1) CN107479890B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10341427A (en) * 1997-06-05 1998-12-22 Sanyo Electric Co Ltd Automatic alarm system
CN101924656A (en) * 2010-08-26 2010-12-22 北京天融信科技有限公司 Method and device for realizing network equipment CLI (Command Line Interface for batch scripti) based on dynamic configuration
CN103198722A (en) * 2013-03-15 2013-07-10 肖云飞 English training method and English training device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10341427A (en) * 1997-06-05 1998-12-22 Sanyo Electric Co Ltd Automatic alarm system
CN101924656A (en) * 2010-08-26 2010-12-22 北京天融信科技有限公司 Method and device for realizing network equipment CLI (Command Line Interface for batch scripti) based on dynamic configuration
CN103198722A (en) * 2013-03-15 2013-07-10 肖云飞 English training method and English training device

Also Published As

Publication number Publication date
CN107479890B (en) 2021-01-01

Similar Documents

Publication Publication Date Title
US8700998B2 (en) Foreign language translation tool
US20150269140A1 (en) Dynamic software localization
US7149971B2 (en) Method, apparatus, and system for providing multi-language character strings within a computer
JP4396994B2 (en) Resource file translation verification method, apparatus, and program
US8875103B2 (en) Method of testing multiple language versions of a software system using one test script
CN101667118A (en) Method and device for multi-language version development and replacement
US8976118B2 (en) Method for character correction
US20100107114A1 (en) In context web page localization
US7680668B2 (en) Method for generating a language-independent regression test script
JPH0833806B2 (en) Multilingual conversion processing method in data processor
US9817811B2 (en) Web server system, dictionary system, dictionary call method, screen control display method, and demonstration application generation method
CN102693221A (en) Method and system for converting resource file language
US20080276166A1 (en) Automatic switching fonts on multilingual text runs
CN113139390A (en) Language conversion method and device applied to code character strings
US20020091510A1 (en) Method for producing a user interface translation system
JP2006276953A (en) Screen definition data difference extraction method, device and program
CN107357569B (en) Unified management method and system for multi-language resource files, computer readable storage medium and equipment
CN110929100B (en) Method and device for acquiring value taking path, storage medium and electronic equipment
US8561057B2 (en) Information processing apparatus, processing method, and computer-readable recording medium having processing program recorded thereon
CN112130952A (en) Multi-language display method, device, equipment and product
CN107479890A (en) Method and system using different literals display command help information is realized based on Zebra
US20210004524A1 (en) Catalog file creation assistance device, catalog file creation assistance method, and catalog file creation assistance program
CN111061466A (en) Automatic conversion method, system, terminal and medium of behavior control scripting language
JP2004126866A (en) Description output suppression program analysis system and description output suppression program analysis method
US20070169035A1 (en) Method and system for configuring the language of a computer program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20201211

Address after: Room 805, building 15, North Tower office building, Jinmao Plaza, 1177 Huanhu Road, Tianding street, Yuelu District, Changsha City, Hunan Province

Applicant after: Changsha Xingrong Metadata Technology Co.,Ltd.

Address before: C-1501, century science and trade building, 66 Zhongguancun East Road, Haidian District, Beijing 100080

Applicant before: BEIJING ZHONGCHUANG TENGRUI TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant