[tr064] Added default i18n properties file (#11619)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
This commit is contained in:
parent
926240770b
commit
f9695f2d8d
@ -34,37 +34,36 @@ import org.slf4j.LoggerFactory;
|
|||||||
*/
|
*/
|
||||||
@ThingActionsScope(name = "tr064")
|
@ThingActionsScope(name = "tr064")
|
||||||
@NonNullByDefault
|
@NonNullByDefault
|
||||||
@SuppressWarnings("unused")
|
|
||||||
public class PhonebookActions implements ThingActions {
|
public class PhonebookActions implements ThingActions {
|
||||||
private final Logger logger = LoggerFactory.getLogger(PhonebookActions.class);
|
private final Logger logger = LoggerFactory.getLogger(PhonebookActions.class);
|
||||||
|
|
||||||
private @Nullable Tr064RootHandler handler;
|
private @Nullable Tr064RootHandler handler;
|
||||||
|
|
||||||
@RuleAction(label = "@text/phonebookLookupActionLabel", description = "@text/phonebookLookupActionDescription")
|
@RuleAction(label = "@text/phonebookLookupActionLabel", description = "@text/phonebookLookupActionDescription")
|
||||||
public @ActionOutput(name = "name", type = "java.lang.String") String phonebookLookup(
|
public @ActionOutput(name = "name", label = "@text/phonebookLookupActionOutputLabel", description = "@text/phonebookLookupActionOutputDescription", type = "java.lang.String") String phonebookLookup(
|
||||||
@ActionInput(name = "phonenumber") @Nullable String phonenumber,
|
@ActionInput(name = "phonenumber", label = "@text/phonebookLookupActionInputPhoneNumberLabel", description = "@text/phonebookLookupActionInputPhoneNumberDescription", type = "java.lang.String", required = true) @Nullable String phonenumber,
|
||||||
@ActionInput(name = "matches") @Nullable Integer matchCount) {
|
@ActionInput(name = "matches", label = "@text/phonebookLookupActionInputMatchesLabel", description = "@text/phonebookLookupActionInputMatchesDescription", type = "java.lang.Integer") @Nullable Integer matchCount) {
|
||||||
return phonebookLookup(phonenumber, null, matchCount);
|
return phonebookLookup(phonenumber, null, matchCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
@RuleAction(label = "@text/phonebookLookupActionLabel", description = "@text/phonebookLookupActionDescription")
|
@RuleAction(label = "@text/phonebookLookupActionLabel", description = "@text/phonebookLookupActionDescription")
|
||||||
public @ActionOutput(name = "name", type = "java.lang.String") String phonebookLookup(
|
public @ActionOutput(name = "name", label = "@text/phonebookLookupActionOutputLabel", description = "@text/phonebookLookupActionOutputDescription", type = "java.lang.String") String phonebookLookup(
|
||||||
@ActionInput(name = "phonenumber") @Nullable String phonenumber) {
|
@ActionInput(name = "phonenumber", label = "@text/phonebookLookupActionInputPhoneNumberLabel", description = "@text/phonebookLookupActionInputPhoneNumberDescription", type = "java.lang.String", required = true) @Nullable String phonenumber) {
|
||||||
return phonebookLookup(phonenumber, null, null);
|
return phonebookLookup(phonenumber, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@RuleAction(label = "@text/phonebookLookupActionLabel", description = "@text/phonebookLookupActionDescription")
|
@RuleAction(label = "@text/phonebookLookupActionLabel", description = "@text/phonebookLookupActionDescription")
|
||||||
public @ActionOutput(name = "name", type = "java.lang.String") String phonebookLookup(
|
public @ActionOutput(name = "name", label = "@text/phonebookLookupActionOutputLabel", description = "@text/phonebookLookupActionOutputDescription", type = "java.lang.String") String phonebookLookup(
|
||||||
@ActionInput(name = "phonenumber") @Nullable String phonenumber,
|
@ActionInput(name = "phonenumber", label = "@text/phonebookLookupActionInputPhoneNumberLabel", description = "@text/phonebookLookupActionInputPhoneNumberDescription", type = "java.lang.String", required = true) @Nullable String phonenumber,
|
||||||
@ActionInput(name = "phonebook") @Nullable String phonebook) {
|
@ActionInput(name = "phonebook", label = "@text/phonebookLookupActionInputPhoneBookLabel", description = "@text/phonebookLookupActionInputPhoneBookDescription", type = "java.lang.String") @Nullable String phonebook) {
|
||||||
return phonebookLookup(phonenumber, phonebook, null);
|
return phonebookLookup(phonenumber, phonebook, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@RuleAction(label = "@text/phonebookLookupActionLabel", description = "@text/phonebookLookupActionDescription")
|
@RuleAction(label = "@text/phonebookLookupActionLabel", description = "@text/phonebookLookupActionDescription")
|
||||||
public @ActionOutput(name = "name", type = "java.lang.String") String phonebookLookup(
|
public @ActionOutput(name = "name", label = "@text/phonebookLookupActionOutputLabel", description = "@text/phonebookLookupActionOutputDescription", type = "java.lang.String") String phonebookLookup(
|
||||||
@ActionInput(name = "phonenumber") @Nullable String phonenumber,
|
@ActionInput(name = "phonenumber", label = "@text/phonebookLookupActionInputPhoneNumberLabel", description = "@text/phonebookLookupActionInputPhoneNumberDescription", type = "java.lang.String", required = true) @Nullable String phonenumber,
|
||||||
@ActionInput(name = "phonebook") @Nullable String phonebook,
|
@ActionInput(name = "phonebook", label = "@text/phonebookLookupActionInputPhoneBookLabel", description = "@text/phonebookLookupActionInputPhoneBookDescription", type = "java.lang.String") @Nullable String phonebook,
|
||||||
@ActionInput(name = "matches") @Nullable Integer matchCount) {
|
@ActionInput(name = "matches", label = "@text/phonebookLookupActionInputMatchesLabel", description = "@text/phonebookLookupActionInputMatchesDescription", type = "java.lang.Integer") @Nullable Integer matchCount) {
|
||||||
if (phonenumber == null) {
|
if (phonenumber == null) {
|
||||||
logger.warn("Cannot lookup a missing number.");
|
logger.warn("Cannot lookup a missing number.");
|
||||||
return "";
|
return "";
|
||||||
|
|||||||
@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
<config-description uri="profile:transform:PHONEBOOK">
|
<config-description uri="profile:transform:PHONEBOOK">
|
||||||
<parameter name="phonebook" type="text" required="true">
|
<parameter name="phonebook" type="text" required="true">
|
||||||
<label>Phone book</label>
|
<label>Phone Book</label>
|
||||||
<description>The name of the the phone book</description>
|
<description>The name of the the phone book.</description>
|
||||||
</parameter>
|
</parameter>
|
||||||
<parameter name="matchCount" type="integer" min="0" step="1">
|
<parameter name="matchCount" type="integer" min="0" step="1">
|
||||||
<label>Match Count</label>
|
<label>Match Count</label>
|
||||||
@ -17,7 +17,7 @@
|
|||||||
<parameter name="phoneNumberIndex" type="integer" min="0" max="1" step="1">
|
<parameter name="phoneNumberIndex" type="integer" min="0" max="1" step="1">
|
||||||
<label>Phone Number Index</label>
|
<label>Phone Number Index</label>
|
||||||
<description>The index of the phone number to be resolved from a CallItem state (StringListType), 0 or 1 (default is
|
<description>The index of the phone number to be resolved from a CallItem state (StringListType), 0 or 1 (default is
|
||||||
0)</description>
|
0).</description>
|
||||||
<default>0</default>
|
<default>0</default>
|
||||||
</parameter>
|
</parameter>
|
||||||
</config-description>
|
</config-description>
|
||||||
|
|||||||
@ -1,5 +1,65 @@
|
|||||||
profile-type.transform.PHONEBOOK.label = Phonebook
|
# binding
|
||||||
profile.config.transform.PHONEBOOK.phonebook.label = Phonebook
|
|
||||||
|
binding.tr064.name = TR-064 Binding
|
||||||
|
binding.tr064.description = This is the binding for TR-064 device support.
|
||||||
|
|
||||||
|
# thing types
|
||||||
|
|
||||||
|
thing-type.tr064.fritzbox.label = FRITZ!Box
|
||||||
|
thing-type.tr064.fritzbox.description = A physical FRITZ!Box device.
|
||||||
|
thing-type.tr064.generic.label = Generic CPE
|
||||||
|
thing-type.tr064.subdevice.label = Sub-Device
|
||||||
|
thing-type.tr064.subdevice.description = A virtual sub-device.
|
||||||
|
thing-type.tr064.subdeviceLan.label = Sub-Device (LAN)
|
||||||
|
thing-type.tr064.subdeviceLan.description = A virtual Sub-Device (LAN).
|
||||||
|
|
||||||
|
# thing types config
|
||||||
|
|
||||||
|
thing-type.config.tr064.fritzbox.callDeflectionIndices.label = Call Deflection
|
||||||
|
thing-type.config.tr064.fritzbox.callDeflectionIndices.description = List of call deflection IDs (starting with 0).
|
||||||
|
thing-type.config.tr064.fritzbox.callListDays.label = Call List Days
|
||||||
|
thing-type.config.tr064.fritzbox.callListDays.description = List of days for which JSON call list should be generated.
|
||||||
|
thing-type.config.tr064.fritzbox.host.label = Host
|
||||||
|
thing-type.config.tr064.fritzbox.host.description = Host name or IP address.
|
||||||
|
thing-type.config.tr064.fritzbox.inboundCallDays.label = Inbound Call Days
|
||||||
|
thing-type.config.tr064.fritzbox.inboundCallDays.description = List of days for which inbound calls should be calculated.
|
||||||
|
thing-type.config.tr064.fritzbox.missedCallDays.label = Missed Call Days
|
||||||
|
thing-type.config.tr064.fritzbox.missedCallDays.description = List of days for which missed calls should be calculated.
|
||||||
|
thing-type.config.tr064.fritzbox.outboundCallDays.label = Outbound Call Days
|
||||||
|
thing-type.config.tr064.fritzbox.outboundCallDays.description = List of days for which outbound calls should be calculated.
|
||||||
|
thing-type.config.tr064.fritzbox.password.label = Password
|
||||||
|
thing-type.config.tr064.fritzbox.phonebookInterval.label = Phone Book Interval
|
||||||
|
thing-type.config.tr064.fritzbox.phonebookInterval.description = The interval for refreshing the phone book (disabled = 0).
|
||||||
|
thing-type.config.tr064.fritzbox.refresh.label = Refresh Interval
|
||||||
|
thing-type.config.tr064.fritzbox.rejectedCallDays.label = Rejected Call Days
|
||||||
|
thing-type.config.tr064.fritzbox.rejectedCallDays.description = List of days for which rejected calls should be calculated.
|
||||||
|
thing-type.config.tr064.fritzbox.tamIndices.label = TAM
|
||||||
|
thing-type.config.tr064.fritzbox.tamIndices.description = List of answering machines (starting with 0).
|
||||||
|
thing-type.config.tr064.fritzbox.timeout.label = Timeout
|
||||||
|
thing-type.config.tr064.fritzbox.timeout.description = Timeout for all requests (SOAP requests, phone book retrieval, call lists, ...).
|
||||||
|
thing-type.config.tr064.fritzbox.user.label = Username
|
||||||
|
thing-type.config.tr064.fritzbox.wanBlockIPs.label = WAN Block IPs
|
||||||
|
thing-type.config.tr064.fritzbox.wanBlockIPs.description = List of IPs that can be blocked for WAN access.
|
||||||
|
thing-type.config.tr064.generic.host.label = Host
|
||||||
|
thing-type.config.tr064.generic.host.description = Host name or IP address.
|
||||||
|
thing-type.config.tr064.generic.password.label = Password
|
||||||
|
thing-type.config.tr064.generic.refresh.label = Refresh Interval
|
||||||
|
thing-type.config.tr064.generic.timeout.label = Timeout
|
||||||
|
thing-type.config.tr064.generic.timeout.description = Timeout for all requests (SOAP requests, phone book retrieval, call lists, ...).
|
||||||
|
thing-type.config.tr064.generic.user.label = Username
|
||||||
|
thing-type.config.tr064.subdevice.refresh.label = Refresh Interval
|
||||||
|
thing-type.config.tr064.subdevice.uuid.label = UUID
|
||||||
|
thing-type.config.tr064.subdevice.uuid.description = UUID of the sub-device
|
||||||
|
thing-type.config.tr064.subdeviceLan.macOnline.label = MAC Online
|
||||||
|
thing-type.config.tr064.subdeviceLan.macOnline.description = List of MACs for "online" status detection (format: 11:11:11:11:11:11).
|
||||||
|
thing-type.config.tr064.subdeviceLan.refresh.label = Refresh Interval
|
||||||
|
thing-type.config.tr064.subdeviceLan.uuid.label = UUID
|
||||||
|
thing-type.config.tr064.subdeviceLan.uuid.description = UUID of the sub-device
|
||||||
|
|
||||||
|
# thing types config
|
||||||
|
|
||||||
|
profile-type.transform.PHONEBOOK.label = Phone Book
|
||||||
|
profile.config.transform.PHONEBOOK.phonebook.label = Phone Book
|
||||||
profile.config.transform.PHONEBOOK.phonebook.description = The phone book name.
|
profile.config.transform.PHONEBOOK.phonebook.description = The phone book name.
|
||||||
profile.config.transform.PHONEBOOK.matchCount.label = Match Count
|
profile.config.transform.PHONEBOOK.matchCount.label = Match Count
|
||||||
profile.config.transform.PHONEBOOK.matchCount.description = The number of matching numbers required for matches. Matching is done from the far end of numbers. The default value is 0, which is considered as "match everything".
|
profile.config.transform.PHONEBOOK.matchCount.description = The number of matching numbers required for matches. Matching is done from the far end of numbers. The default value is 0, which is considered as "match everything".
|
||||||
@ -7,5 +67,14 @@ profile.config.transform.PHONEBOOK.phoneNumberIndex.label = Phone Number Index
|
|||||||
profile.config.transform.PHONEBOOK.phoneNumberIndex.description = The index of the phone number that is resolved from a CallItem-State (StringListType), 0 (default) or 1.
|
profile.config.transform.PHONEBOOK.phoneNumberIndex.description = The index of the phone number that is resolved from a CallItem-State (StringListType), 0 (default) or 1.
|
||||||
|
|
||||||
# actions
|
# actions
|
||||||
|
|
||||||
phonebookLookupActionLabel = lookup a phone number
|
phonebookLookupActionLabel = lookup a phone number
|
||||||
phonebookLookupActionDescription = Lookup a phone number.
|
phonebookLookupActionDescription = Lookup a phone number.
|
||||||
|
phonebookLookupActionOutputLabel = Name
|
||||||
|
phonebookLookupActionOutputDescription = The name associated with the phone number (or the phone number if no match can be found).
|
||||||
|
phonebookLookupActionInputPhoneNumberLabel = Phone Number
|
||||||
|
phonebookLookupActionInputPhoneNumberDescription = The phone number to be resolved.
|
||||||
|
phonebookLookupActionInputPhoneBookLabel = Phone Book
|
||||||
|
phonebookLookupActionInputPhoneBookDescription = The name of the the phone book.
|
||||||
|
phonebookLookupActionInputMatchesLabel = Match Count
|
||||||
|
phonebookLookupActionInputMatchesDescription = The number of digits matching the incoming value, counted from far right (default is 0 = all matching). Negative numbers skip digits from the left.
|
||||||
|
|||||||
@ -26,14 +26,13 @@
|
|||||||
<parameter name="refresh" type="integer" unit="s">
|
<parameter name="refresh" type="integer" unit="s">
|
||||||
<label>Refresh Interval</label>
|
<label>Refresh Interval</label>
|
||||||
<default>60</default>
|
<default>60</default>
|
||||||
<unitLabel>s</unitLabel>
|
|
||||||
</parameter>
|
</parameter>
|
||||||
</config-description>
|
</config-description>
|
||||||
</bridge-type>
|
</bridge-type>
|
||||||
|
|
||||||
<bridge-type id="fritzbox">
|
<bridge-type id="fritzbox">
|
||||||
<label>FritzBox</label>
|
<label>FRITZ!Box</label>
|
||||||
<description>A physical FritzBox Device.</description>
|
<description>A physical FRITZ!Box device.</description>
|
||||||
|
|
||||||
<representation-property>host</representation-property>
|
<representation-property>host</representation-property>
|
||||||
|
|
||||||
@ -54,7 +53,6 @@
|
|||||||
<parameter name="refresh" type="integer" unit="s">
|
<parameter name="refresh" type="integer" unit="s">
|
||||||
<label>Refresh Interval</label>
|
<label>Refresh Interval</label>
|
||||||
<default>60</default>
|
<default>60</default>
|
||||||
<unitLabel>s</unitLabel>
|
|
||||||
</parameter>
|
</parameter>
|
||||||
<parameter name="tamIndices" type="text" multiple="true">
|
<parameter name="tamIndices" type="text" multiple="true">
|
||||||
<label>TAM</label>
|
<label>TAM</label>
|
||||||
@ -97,8 +95,8 @@
|
|||||||
<advanced>true</advanced>
|
<advanced>true</advanced>
|
||||||
</parameter>
|
</parameter>
|
||||||
<parameter name="phonebookInterval" type="integer" min="0" unit="s">
|
<parameter name="phonebookInterval" type="integer" min="0" unit="s">
|
||||||
<label>Phonebook Interval</label>
|
<label>Phone Book Interval</label>
|
||||||
<description>The interval for refreshing the phonebook (disabled = 0)</description>
|
<description>The interval for refreshing the phone book (disabled = 0).</description>
|
||||||
<default>600</default>
|
<default>600</default>
|
||||||
<advanced>true</advanced>
|
<advanced>true</advanced>
|
||||||
</parameter>
|
</parameter>
|
||||||
@ -123,7 +121,6 @@
|
|||||||
<parameter name="refresh" type="integer" unit="s">
|
<parameter name="refresh" type="integer" unit="s">
|
||||||
<label>Refresh Interval</label>
|
<label>Refresh Interval</label>
|
||||||
<default>60</default>
|
<default>60</default>
|
||||||
<unitLabel>s</unitLabel>
|
|
||||||
</parameter>
|
</parameter>
|
||||||
</config-description>
|
</config-description>
|
||||||
</thing-type>
|
</thing-type>
|
||||||
@ -146,7 +143,6 @@
|
|||||||
<parameter name="refresh" type="integer" unit="s">
|
<parameter name="refresh" type="integer" unit="s">
|
||||||
<label>Refresh Interval</label>
|
<label>Refresh Interval</label>
|
||||||
<default>60</default>
|
<default>60</default>
|
||||||
<unitLabel>s</unitLabel>
|
|
||||||
</parameter>
|
</parameter>
|
||||||
<parameter name="macOnline" type="text" multiple="true">
|
<parameter name="macOnline" type="text" multiple="true">
|
||||||
<label>MAC Online</label>
|
<label>MAC Online</label>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user