DtlTraders/locale: Difference between revisions

From Citizens Wiki
m (dodana nawigacja - lethe)
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
Nicer formatting will be added later
== Locale incoming with version 2.5 ==


<div style="border: dashed 1px #2F6FAB;background-color:#F9F9F9;color:green;margin:12px 0px;padding:12px;white-space:pre;font: normal normal 400 13px/19.5px Consolas;width:100%">
=== General changes ===
In generally the whole locale system was changed.  
That allowed me to create a self updating locale, so if you are running the plugin in the default english version you don't need anymore to matter about the locale, its going to update itself if needed :)


#static keywords list
Also translating the locale should be easier, every key is now named in a much obvious way :P
definitions:
Decreased the amount of keywords but from up now there are more messages in the locale


#{action} keywords
# all old messages where renamed, so the are much more obvious
  withdrawed: 'withdrawed'
# many keywords where removed
  deposited: 'deposited'
# added lores to the locale file
  balance: 'has'


# manging {action} keywords
 
  added: 'Added'
=== Updating ===
  selected: 'Selected'
When a locale is going to update itself, it will '''backup''' all old messages into a '''backup''' tree within the same locale file, so no messages are going vanish with a update.
  removed: 'Removed'
However if a locale is going to be updated several the backup form the previous update is lost.
  updated: 'Updated'
 
  invalid: 'Invalid'
Also when creating a '''translated locale''', always keep in mind to set the '''ver''' tag for the version you are creating the locale
 
 
#{transaction} keywords
=== Latest build changes ===
  bought: 'bought'
 
  buy: 'buy'
This file tells the updater what changes to apply to outdated locale files.
  sold: 'sold'
Depending if the '''new''' key exists in a definition, it will '''add''' or '''change''' the given locale entry.
  sell: 'sell'
 
 
example:
#{type}, {argument}, {object}, {value} keyworkds
<pre>
  wallet: 'Wallet'
   player-trader:
  type: 'Type'
    keyword: Player Trader
  tab-price: 'Tab price'
    new: trader-player
  withdraw-fee: 'Withdraw fee'
</pre>
  deposit-fee: 'Deposit fee'
will look for the '''player-trader''' keyword, save it into the backup tree and add a new key with the name in '''new''' with the given value.
 
 
#{entity}, {setting} keywords
This file is going to be cleared with any next build after a release version.
  trader: 'Trader'
 
  banker: 'Banker'
<pre>
  player: 'You'  
 
#{reason} keywords
   no-money: 'no money'
  limit-reached: 'limit reached'
  full-inventory: 'inventory full'
 
#{manage} keywords
  global-limit: 'Global limit'
  player-limit: 'Player limit'
  player-timeout: 'Player timeout'
  global-timeout: 'Global timeout'
  stack-price: 'Stack price'
  price: 'Price'
 
messages:  
messages:  
#General Trader messages
   denizen-item-hint:
   xxx-item-cost-xxx: ^6This item costs ^8{price}$
    message: '{item}: {price}'
   xxx-transaction-xxx-item: ^8{entity} ^6{transaction} this item for ^8{amount}$
   trader-transaction-success:
   xxx-transaction-falied-xxx: ^6{transaction} falied, ^8{reason}
    message: ^6You {action} ^3{amount} ^6for ^3{price}
   xxx-transaction-continue: ^6To {transaction}, click a second time
   error-argument-invalid:
    
    message: '^6Invalid argument was supplied: ^3{argument}'
#Player trader messages
  plugin-command-message:  
   item-amount-recover: ^6You got ^8{amount}
    message: '^6== dtlTraders ^3{version} ^6=='
   item-in-stock: ^6Item already in stock
  error-npc-not-selected:
   item-added-selling: ^6Added ^8{amount} ^6items for sell
    message: '^6You did not selected any trader'
   item-buy-limit: '^6Buy limit: ^8{amount}^6/^c{limit}'  
  wallet-balance:
    
    message: '^6Wallet balance: ^3{amount}'
#Commands
   wallet-deposit:
   xxx-argument-invalid: ^8{argument} ^6argument is invalid
    message: ^6Deposited ^3{amount}  
   xxx-argument-missing: ^8{argument} ^6argument is missing
   wallet-deposit-fail:
   xxx-setting-changed: ^8{setting} ^6has ben changed to ^8{value}
    message: 'You dont have enought money'
   xxx-setting-value: ^6Current ^8{setting} ^6is ^8{value}
   wallet-withdraw:
   xxx-not-selected: ^6You haven't selected any ^8{type}
    message: ^6Withdrawed ^3{amount}
   save-config: ^6Configuration was saved
  wallet-withdraw-fail:
   reload-config: ^6Configuration was reloaded
    message: '^6Is there enough money to withdraw from this wallet?'
    
  wallet-invalid:
#money messages
    message: ^6You can not use this command on this wallet type
   xxx-not-enough-money: ^6{type} ^c{name} ^6has not enough money
  pattern-save-success:
   xxx-money-xxx: ^8{entity} ^6{action} ^8{money}$
    message: ^6Successfuly created ^3{pattern} ^6pattern
   player-not-enough-money: ^6You don't have enought money
   pattern-save-fail-exists:
    
    message: ^6This pattern already exists {pattern}
#manager messages
   error-command-invalid:
   xxx-managing-toggled: ^6{entity} toggled the ^8{manage} ^6mode
    message: '^6This command is invalid'
   xxx-value: '^6{manage}: ^8{value}'  
  banker-created:  
   xxx-value-changed: '^6Changed {manage}: ^8{value}'  
    message: '^6You created a new banker: {banker}'
   xxx-item: ^6{action} item
  trader-created:
    
    message: '^6You created a new trader: {trader}'
#List command format
keywords:
   list-header: ^6Trader stock list, page ^8{curp} ^6of ^c{allp}
  bought:
   list-message: ^7{nr}. ^8{item} ^7(^e{id}^8/^c{data}^8) ^f{amount} {price} ^e[{slot}]
    keyword: Bought
    
  sold:
#Warnings, errors etc
    keyword: Sold
   player-lacks-permissions: ^6You don't have permission
  type:
   player-lacks-permissions-xxx: ^6You don't have permission, to use this ^b{object}
    keyword: Type
  player-lacks-permissions-creative: ^6You can't use this while in creative mode
  server-trader:
    keyword: Server Trader
    new: trader-server
  player-trader:
    keyword: Player Trader
    new: trader-player
  market-trader:
    keyword: Market Trader
    new: trader-market
  banker-type:
    keyword: Banker type
  banker-private:
    keyword: Private Banker
  banker-money:
    keyword: Money Banker
lores:
  manage-price:
    name: ^r^6Price management
    lore:
    - ^7Click to toggle price managing
   manage-buy-limit:  
    name: ^r^6Buy limit management
    lore:
    - ^7Allows to set amounts you
    - ^7want to buy from players
</pre>
 
=== Release locale file (atm latest build version) ===
 
<pre>
ver: 1.0.5
messages:
  plugin-reload: ^6Successfuly reloaded ^3dtlTraders
  plugin-command-message: '^6== dtlTraders ^3{version} ^6=='
   error-nopermission: ^6You dont have permissions to do this
  error-nopermission-creative: ^6You dont have permissions to do this while in ^3creative mode
   error-command-invalid: '^6This command is invalid'
   error-argument-missing: '^6Argument is missing: {argument}'
   error-argument-invalid: '^6Invalid argument was supplied: ^3{argument}'
  error-npc-not-selected: '^6You did not selected any trader'
   trader-manage-toggle: ^6Toggled ^3{mode} ^6management
  trader-created: '^6You created a new trader: {trader}'
   trader-stock-item-select: ^6Item selected
  trader-stock-item-add: ^6Item added
   trader-stock-item-update: ^6Item updated
   trader-stock-item-remove: ^6Item removed
   trader-transaction-success: ^3You bought/sold an item
  trader-transaction-failed-limit: ^6Limit for that item has been reached
   trader-transaction-failed-inventory: ^6You dont got enough place in your inventory
  trader-transaction-failed-money: ^6Someone does not have enough money
   managermode-enabled: ^6Manager mode enabled for ^3{npc}
  managermode-disabled: ^6Manager mode disabled for ^3{npc}
  wallet-balance: '^6Wallet balance: ^3{amount}'
  wallet-deposit: ^6Deposited ^3{amount}  
   wallet-deposit-fail: 'You dont have enought money'
   wallet-withdraw: ^6Withdrawed ^3{amount}
  wallet-withdraw-fail: '^6Is there enough money to withdraw from this wallet?'
  wallet-invalid: ^6You can not use this command on this wallet type
   pattern-save-success: ^6Successfuly created ^3{pattern} ^6pattern
  pattern-save-fail-exists: ^6This pattern already exists ^3{pattern}
   banker-created: '^6You created a new banker: {banker}'
  banker-tab-switch: ^6Switched to ^3{tab}
  banker-deposit-success: ^6Item deposited
  banker-withdraw-success: ^6Item withdrawed
  banker-tab-buy-success: ^6Bought a new tab
  banker-tab-select-item: ^6Select a new tab item
  banker-tab-select-item-success: ^6New item was set
  banker-tab-select-item-canceled: ^6Selecting was aborted
  denizen-item-hint: '{item}: {price}'
   key-change: '^6Changed {key}: ^3{value}'
   key-value: '^6{key}: ^3{value}'
keywords:
  manage-global-limit: Global limit
  manage-player-limit: Player Limit
  manage-stock: Stock
  manage-price: Price
  price: Price
  owner: Owner
  wallet: Wallet
  stack-price: Stack price
  enabled: Enabled
  disabled: Disabled
  tab-price: Tab price
  trader-type: Trader type
  trader-server: Server Trader
  trader-player: Player Trader
  trader-market: Market Trader
  banker-type: Banker type
  banker-private: Private Banker
   banker-money: Money Banker
lores:
   player-inventory:
    lore:
    - '^7Unit price: ^6{unit}'
    - '^7Stack price: ^6{stack}'
    - ^7Click to sell
   trader-inventory-sell:
    lore:
    - '^7Price: ^6{price}'
    - ^7Click to buy
  trader-inventory-buy:
    lore:
    - '^7Price: ^6{price}'
  sell-tab:
    name: ^r^6Sell stock
    lore:
    - ^7Click to switch to buy stock
  buy-tab:
    name: ^r^6Buy stock
    lore:
    - ^7Click to switch to sell stock
  manage-price:
    name: ^r^6Price management
    lore:
    - ^7Click to toggle price managing
   manage-global-limit:
    name: ^r^6Global limit management
    lore:
    - ^7Click to toggle global limit managing
   manage-player-limit:
    name: ^r^6Player limit management
    lore:
    - ^7Click to toggle player limit managing
   manage-buy-limit:
    name: ^r^6Buy limit management
    lore:
    - ^7Allows to set amounts you
    - ^7want to buy from players
  return:
    name: ^r^6Return
    lore:
    - ^7Return to stock management
  amounts-return:
    name: 'Back to stock'
</pre>
 
== Navigation ==
{| class="wikitable" style="text-align: center; width: 500px"
|-
! style="width: 100%; background-color:#ADD8E6" colspan="2" | '''DtlTraders'''
|-
| Configuration || <!--| [http://wiki.citizensnpcs.com/DtlTraders/config Configuration] -->| [http://wiki.citizensnpcs.com/DtlTraders/Commands Commands] | [http://wiki.citizensnpcs.com/DtlTraders/permissions Permissions] | [http://wiki.citizensnpcs.com/DtlTraders/locale Locale]
|-
| Usage || <!--| [http://wiki.citizensnpcs.com/DtlTraders/managing Managing] | [http://wiki.citizensnpcs.com/DtlTraders/trading Trading] | [http://wiki.citizensnpcs.com/DtlTraders/banking Banking] |--> [http://wiki.citizensnpcs.com/DtlTraders/patterns Patterns]
|-
| Types || <!--| [http://wiki.citizensnpcs.com/DtlTraders/traders Traders] | [http://wiki.citizensnpcs.com/DtlTraders/bankers Bankers] <!--| [http://wiki.citizensnpcs.com/DtlTraders/auctionhouse Auction House] | [http://wiki.citizensnpcs.com/DtlTraders/wallets Wallets]-->
|-
| Denizen Support || <!--| [http://wiki.citizensnpcs.com/DtlTraders/denizen/commands Commands] | [http://wiki.citizensnpcs.com/DtlTraders/denizen/triggers Triggers] -->
|}
 
 
<!--


#money banker messages
  mbank-item-xxx: ^6You {action} ^8{amount} ^6items
       
#banker
  tab-xxx: ^6You {action} a tab {value}
  tab-switched: ^6You switched to ^8{tab} ^6tab
  cant-create-account: ^6You can't create an account
</div>
== Navigation ==
== Navigation ==
{| class="wikitable" style="text-align: center; width: 500px"
{| class="wikitable" style="text-align: center; width: 500px"
Line 104: Line 233:
! style="width: 100%; background-color:#ADD8E6" colspan="2" | '''DtlTraders'''
! style="width: 100%; background-color:#ADD8E6" colspan="2" | '''DtlTraders'''
|-
|-
| Usage || | [http://wiki.citizensnpcs.com/DtlTraders/managing Managing] | [http://wiki.citizensnpcs.com/DtlTraders/trading Trading] | [http://wiki.citizensnpcs.com/DtlTraders/banking Banking] <!-- | [http://wiki.citizensnpcs.com/DtlTraders/patterns Patterns] -->
| Usage || | [http://wiki.citizensnpcs.com/DtlTraders/managing Managing] | [http://wiki.citizensnpcs.com/DtlTraders/trading Trading] | [http://wiki.citizensnpcs.com/DtlTraders/banking Banking] | [http://wiki.citizensnpcs.com/DtlTraders/patterns Patterns]  
|-
|-
| Configuration || | [http://wiki.citizensnpcs.com/DtlTraders/config Configuration] | [http://wiki.citizensnpcs.com/DtlTraders/Commands Commands] | [http://wiki.citizensnpcs.com/DtlTraders/permissions Permissions] | [http://wiki.citizensnpcs.com/DtlTraders/locale Locale]  
| Configuration || | [http://wiki.citizensnpcs.com/DtlTraders/config Configuration] | [http://wiki.citizensnpcs.com/DtlTraders/Commands Commands] | [http://wiki.citizensnpcs.com/DtlTraders/permissions Permissions] | [http://wiki.citizensnpcs.com/DtlTraders/locale Locale]  
|-
|-
| Types || | [http://wiki.citizensnpcs.com/DtlTraders/traders Traders] | [http://wiki.citizensnpcs.com/DtlTraders/bankers Bankers] <!--| [http://wiki.citizensnpcs.com/DtlTraders/auctionhouse Auction House] | [http://wiki.citizensnpcs.com/DtlTraders/wallets Wallets]-->
| Types || | [http://wiki.citizensnpcs.com/DtlTraders/traders Traders] | [http://wiki.citizensnpcs.com/DtlTraders/bankers Bankers] | [http://wiki.citizensnpcs.com/DtlTraders/auctionhouse Auction House] | [http://wiki.citizensnpcs.com/DtlTraders/wallets Wallets]
|}
|}
-->

Latest revision as of 22:49, 5 February 2013

Locale incoming with version 2.5

General changes

In generally the whole locale system was changed. That allowed me to create a self updating locale, so if you are running the plugin in the default english version you don't need anymore to matter about the locale, its going to update itself if needed :)

Also translating the locale should be easier, every key is now named in a much obvious way :P Decreased the amount of keywords but from up now there are more messages in the locale

  1. all old messages where renamed, so the are much more obvious
  2. many keywords where removed
  3. added lores to the locale file


Updating

When a locale is going to update itself, it will backup all old messages into a backup tree within the same locale file, so no messages are going vanish with a update. However if a locale is going to be updated several the backup form the previous update is lost.

Also when creating a translated locale, always keep in mind to set the ver tag for the version you are creating the locale

Latest build changes

This file tells the updater what changes to apply to outdated locale files. Depending if the new key exists in a definition, it will add or change the given locale entry.

example:

  player-trader:
    keyword: Player Trader
    new: trader-player

will look for the player-trader keyword, save it into the backup tree and add a new key with the name in new with the given value.

This file is going to be cleared with any next build after a release version.

messages: 
  denizen-item-hint:
    message: '{item}: {price}'
  trader-transaction-success: 
    message: ^6You {action} ^3{amount} ^6for ^3{price}
  error-argument-invalid:
    message: '^6Invalid argument was supplied: ^3{argument}'
  plugin-command-message: 
    message: '^6== dtlTraders ^3{version} ^6=='
  error-npc-not-selected:
    message: '^6You did not selected any trader'
  wallet-balance: 
    message: '^6Wallet balance: ^3{amount}'
  wallet-deposit: 
    message: ^6Deposited ^3{amount} 
  wallet-deposit-fail: 
    message: 'You dont have enought money' 
  wallet-withdraw: 
    message: ^6Withdrawed ^3{amount} 
  wallet-withdraw-fail: 
    message: '^6Is there enough money to withdraw from this wallet?' 
  wallet-invalid: 
    message: ^6You can not use this command on this wallet type
  pattern-save-success: 
    message: ^6Successfuly created ^3{pattern} ^6pattern
  pattern-save-fail-exists: 
    message: ^6This pattern already exists {pattern}
  error-command-invalid: 
    message: '^6This command is invalid'
  banker-created: 
    message: '^6You created a new banker: {banker}'
  trader-created:
    message: '^6You created a new trader: {trader}'
keywords: 
  bought:
    keyword: Bought
  sold: 
    keyword: Sold
  type: 
    keyword: Type
  server-trader:
    keyword: Server Trader
    new: trader-server
  player-trader:
    keyword: Player Trader
    new: trader-player
  market-trader:
    keyword: Market Trader
    new: trader-market
  banker-type: 
    keyword: Banker type
  banker-private: 
    keyword: Private Banker
  banker-money:
    keyword: Money Banker
lores: 
  manage-price: 
    name: ^r^6Price management
    lore:
    - ^7Click to toggle price managing
  manage-buy-limit: 
    name: ^r^6Buy limit management
    lore:
    - ^7Allows to set amounts you 
    - ^7want to buy from players

Release locale file (atm latest build version)

ver: 1.0.5
messages:
  plugin-reload: ^6Successfuly reloaded ^3dtlTraders
  plugin-command-message: '^6== dtlTraders ^3{version} ^6=='
  error-nopermission: ^6You dont have permissions to do this
  error-nopermission-creative: ^6You dont have permissions to do this while in ^3creative mode
  error-command-invalid: '^6This command is invalid'
  error-argument-missing: '^6Argument is missing: {argument}'
  error-argument-invalid: '^6Invalid argument was supplied: ^3{argument}'
  error-npc-not-selected: '^6You did not selected any trader'
  trader-manage-toggle: ^6Toggled ^3{mode} ^6management
  trader-created: '^6You created a new trader: {trader}'
  trader-stock-item-select: ^6Item selected
  trader-stock-item-add: ^6Item added
  trader-stock-item-update: ^6Item updated
  trader-stock-item-remove: ^6Item removed
  trader-transaction-success: ^3You bought/sold an item
  trader-transaction-failed-limit: ^6Limit for that item has been reached
  trader-transaction-failed-inventory: ^6You dont got enough place in your inventory
  trader-transaction-failed-money: ^6Someone does not have enough money
  managermode-enabled: ^6Manager mode enabled for ^3{npc}
  managermode-disabled: ^6Manager mode disabled for ^3{npc}
  wallet-balance: '^6Wallet balance: ^3{amount}'
  wallet-deposit: ^6Deposited ^3{amount} 
  wallet-deposit-fail: 'You dont have enought money' 
  wallet-withdraw: ^6Withdrawed ^3{amount} 
  wallet-withdraw-fail: '^6Is there enough money to withdraw from this wallet?' 
  wallet-invalid: ^6You can not use this command on this wallet type
  pattern-save-success: ^6Successfuly created ^3{pattern} ^6pattern
  pattern-save-fail-exists: ^6This pattern already exists ^3{pattern}
  banker-created: '^6You created a new banker: {banker}'
  banker-tab-switch: ^6Switched to ^3{tab}
  banker-deposit-success: ^6Item deposited
  banker-withdraw-success: ^6Item withdrawed 
  banker-tab-buy-success: ^6Bought a new tab
  banker-tab-select-item: ^6Select a new tab item
  banker-tab-select-item-success: ^6New item was set
  banker-tab-select-item-canceled: ^6Selecting was aborted
  denizen-item-hint: '{item}: {price}'
  key-change: '^6Changed {key}: ^3{value}'
  key-value: '^6{key}: ^3{value}'
keywords:
  manage-global-limit: Global limit
  manage-player-limit: Player Limit
  manage-stock: Stock
  manage-price: Price
  price: Price
  owner: Owner
  wallet: Wallet
  stack-price: Stack price
  enabled: Enabled
  disabled: Disabled
  tab-price: Tab price
  trader-type: Trader type
  trader-server: Server Trader
  trader-player: Player Trader
  trader-market: Market Trader
  banker-type: Banker type
  banker-private: Private Banker
  banker-money: Money Banker
lores:
  player-inventory:
    lore:
    - '^7Unit price: ^6{unit}'
    - '^7Stack price: ^6{stack}'
    - ^7Click to sell
  trader-inventory-sell:
    lore:
    - '^7Price: ^6{price}'
    - ^7Click to buy
  trader-inventory-buy:
    lore:
    - '^7Price: ^6{price}'
  sell-tab:
    name: ^r^6Sell stock
    lore:
    - ^7Click to switch to buy stock
  buy-tab:
    name: ^r^6Buy stock
    lore:
    - ^7Click to switch to sell stock
  manage-price: 
    name: ^r^6Price management
    lore:
    - ^7Click to toggle price managing
  manage-global-limit: 
    name: ^r^6Global limit management
    lore:
    - ^7Click to toggle global limit managing
  manage-player-limit: 
    name: ^r^6Player limit management
    lore:
    - ^7Click to toggle player limit managing
  manage-buy-limit: 
    name: ^r^6Buy limit management
    lore:
    - ^7Allows to set amounts you 
    - ^7want to buy from players
  return: 
    name: ^r^6Return
    lore:
    - ^7Return to stock management
  amounts-return: 
    name: 'Back to stock'

Navigation

DtlTraders
Configuration Commands | Permissions | Locale
Usage Patterns
Types
Denizen Support