Cannot customize the text from .properties file in Plugin .jar files
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Fisheye および Crucible は除く
問題
When editing the .properties file of a plugin to customize text as described in How to edit bundled or system plugins, the customized text does not display.
Steps to reproduce are:
Confluence を停止します。
Edit the text in the .properties file within a plugin's .jar file as described in How to edit files in Confluence JAR files
Clear Browser's cache
Confluence を再起動します。
The changes made to the text in the .properties file will not be displayed as expected, default text will be shown.
原因
The cause of this issue in Confluence version 6.10 and above is unknown at this time.
See the following Bugtracker which will track this issue moving forward: CONFSERVER-58420 - Getting issue details... STATUS
回避策
This issue can be circumvented by creating a new key in the .properties file and then changing references elsewhere in the plugin to use this key instead of the default key.
Confluence を停止します。
Make a backup copy of the original .jar file
Expand the contents of the .jar file
Locate the text value you wish to change in the .properties file, notate the name of this key
- Create a new key with a similar name, adding a ".custom" to the key's name and customize the text
Search the contents of the files expanded from the .jar for the original key's name
- Replace each reference found to the new key name in each of these files, save
- Recompress the .jar file together with these edited files
- Copy the customized .jar file back to its original location, overwriting the original
Clear Browser's cache
Confluence を再起動します。
Alternatively, you can edit the .soy files directly after expanding the .jar file, then recompress the .jar file when done.