Support > Repository > Change/internationalize message > Edit resource file
ja | en

I will explain how to edit the standard resource file. You can change screen messages and error messages.

All characters such as "item name" included in the design information are stored in "resource file".A representative resource file is shown in the table.

file nameDescription Convert database specific error messages. Error message managed internally by Wagby. This is an entire application message. This message is output to system.log.

These files are managed as follows.

Application message

The file contained in the wagbydesigner/bin/template folder.As you can see from the extension, it is a text file in UTF-8 format.

With this file as the foundation, the item name prepared in the design information is added to the resource.This is a file wagbydesigner/webapps/wagbydesigner/WEB-INF/env/work/srcgen/webpage/WEB-INF/classes/

Error message

Wagbydesigner/bin/webpage/WEB-INF/src This is a file called you can see from the extension, it is a text file in UTF-8 format.

Final resource file

It is prepared in the WEB-INF/classes folder in the built wagbyapp folder.The final format is the ". Properties" file with the extension UTF 8 removed.Application specific information is added to the above "template".

The Japanese resource has "_ja" appended to the file name."_en" and other files such as "InternationalizationI will explain it on the page.
These files are not changed directly with a text editor.Rewrite it by the method explained in the next section.

The resource file is a text file.The inside is in key-value format.

Wagbydesigner/webapps/wagbydesigner/WEB-INF/env/work/srcgen/webpage/WEB-INF/classes/ Excerpts a part of the file.

__jfc_common.logon.title = Logon ___ jfc_common.logon.userid = Username ___ jfc_common.logon.password = Password ___ jfc_common.logon.submit = Logon ___ jfc_common.logon.message = {0} is logged on.
__jfc_common.logon.language = Language: __jfc_common.logon.class.waku = frmLogon __jfc_common.logon.class.logonbutton = btnLogon = Display: mobile ___ = data that matches the search condition Could not be found.
___ = Please enter search criteria.

A line in the file is represented by a pair of "key = message".You can not change the key part (left side of "=").

In the message part you can use "placeholder".This is notation {0}, {1}.In fact, appropriate characters are set in this part.

  1. Open wagbyapp/webapps/wagby/WEB-INF/classes/ with a text editor.(Notepad attached to Windows is not used.Please prepare another text editor such as TeraPad.)
  2. Change the value part (right side of equal) of the resource file.
    ... qa_report.title = Title ...
    The key part of the resource file ("qa_report.title" in the above) must not be changed.
  3. Save the edited file in the customize/resources folder.This will allow you to use the file you edited this time at the next build.

This method replaces the file, but it is deprecated.Please read "Create difference file" in the explanation after this.

Apart from the resource file replacement method, it provides a method of creating a difference file.Even when managed separately as a difference file, they are merged (merged) at the time of build and are put together into one .properties file.

  1. For the file, create a new file which is a file with the prefix "my".The contents of the file are empty.Save this file in the customize/resources folder.
  2. Edit the file that starts with my.At this time, you can substitute by writing the same line as the original message.For example, by adding the following line, we rewrite the message that was originally "logoff".
    ___ jfc_common.globallink.logoff = Logoff!
  3. Merged (combined) at build time.
The expansion of the file with "my" corresponds to all resource files.You can manage only the parts you want to customize.

We recommend a differential file method

There is one " 8" "resource that the system provides as standard" and "resource on model added by the developer".If you edit this file directly, if the resources provided by the system are added or changed at the time of Wagby's version upgrade, it will be necessary for the developer to correct it manually.

In order to omit this trouble, we recommend that you create a file.We separate resources on models added by developers into this my file and manage them.

If you wish to change the wording provided in the standard, you should write it in this my file.The resource described in my file overwrites the standard resource.

Prepare example, if you want to change the message when the new registration of the model 1 model succeeds, write as follows.

Model1.success.normal.termination.insert = You have registered data {0}!

The model name (Japanese) is entered in {0}.

Save this file in the customize/resources folder and rebuild.