Moved taxonomy integration for web form inside CMS_TAXONOMY_API.
Moved a few helpers routine from CMS_RESPONSE to CMS_API. Added CMS_CONTENT.identifier: detachable READABLE_STRING_32 .
This commit is contained in:
@@ -292,6 +292,26 @@ feature -- Logging
|
||||
end
|
||||
end
|
||||
|
||||
feature -- Internationalization (i18n)
|
||||
|
||||
translation (a_text: READABLE_STRING_GENERAL; opts: detachable CMS_API_OPTIONS): STRING_32
|
||||
-- Translated text `a_text' according to expected context (lang, ...)
|
||||
-- and adapt according to options eventually set by `opts'.
|
||||
do
|
||||
to_implement ("Implement i18n support [2015-may]")
|
||||
Result := a_text.as_string_32
|
||||
end
|
||||
|
||||
formatted_string (a_text: READABLE_STRING_GENERAL; args: TUPLE): STRING_32
|
||||
-- Format `a_text' using arguments `args'.
|
||||
--| ex: formatted_string ("hello $1, see page $title.", ["bob", "contact"] -> "hello bob, see page contact"
|
||||
local
|
||||
l_formatter: CMS_STRING_FORMATTER
|
||||
do
|
||||
create l_formatter
|
||||
Result := l_formatter.formatted_string (a_text, args)
|
||||
end
|
||||
|
||||
feature -- Emails
|
||||
|
||||
new_email (a_to_address: READABLE_STRING_8; a_subject: READABLE_STRING_8; a_content: READABLE_STRING_8): CMS_EMAIL
|
||||
|
||||
@@ -13,6 +13,11 @@ inherit
|
||||
|
||||
feature -- Access
|
||||
|
||||
identifier: detachable READABLE_STRING_32
|
||||
-- Optional identifier.
|
||||
deferred
|
||||
end
|
||||
|
||||
title: detachable READABLE_STRING_32
|
||||
-- Title associated with Current content.
|
||||
deferred
|
||||
@@ -37,6 +42,14 @@ feature -- Access
|
||||
|
||||
feature -- Status report
|
||||
|
||||
has_identifier: BOOLEAN
|
||||
-- Current content has identifier?
|
||||
do
|
||||
Result := identifier /= Void
|
||||
ensure
|
||||
Result implies identifier /= Void
|
||||
end
|
||||
|
||||
is_typed_as (a_content_type: READABLE_STRING_GENERAL): BOOLEAN
|
||||
-- Is current node of type `a_content_type' ?
|
||||
do
|
||||
|
||||
@@ -113,26 +113,6 @@ feature -- Access
|
||||
end
|
||||
end
|
||||
|
||||
feature -- Internationalization (i18n)
|
||||
|
||||
translation (a_text: READABLE_STRING_GENERAL; opts: detachable CMS_API_OPTIONS): STRING_32
|
||||
-- Translated text `a_text' according to expected context (lang, ...)
|
||||
-- and adapt according to options eventually set by `opts'.
|
||||
do
|
||||
to_implement ("Implement i18n support [2015-may]")
|
||||
Result := a_text.as_string_32
|
||||
end
|
||||
|
||||
formatted_string (a_text: READABLE_STRING_GENERAL; args: TUPLE): STRING_32
|
||||
-- Format `a_text' using arguments `args'.
|
||||
--| ex: formatted_string ("hello $1, see page $title.", ["bob", "contact"] -> "hello bob, see page contact"
|
||||
local
|
||||
l_formatter: CMS_STRING_FORMATTER
|
||||
do
|
||||
create l_formatter
|
||||
Result := l_formatter.formatted_string (a_text, args)
|
||||
end
|
||||
|
||||
feature -- API
|
||||
|
||||
api: CMS_API
|
||||
@@ -896,6 +876,22 @@ feature -- Menu: change
|
||||
m.extend (lnk)
|
||||
end
|
||||
|
||||
feature -- Internationalization (i18n)
|
||||
|
||||
translation (a_text: READABLE_STRING_GENERAL; opts: detachable CMS_API_OPTIONS): STRING_32
|
||||
-- Translated text `a_text' according to expected context (lang, ...)
|
||||
-- and adapt according to options eventually set by `opts'.
|
||||
do
|
||||
Result := api.translation (a_text, opts)
|
||||
end
|
||||
|
||||
formatted_string (a_text: READABLE_STRING_GENERAL; args: TUPLE): STRING_32
|
||||
-- Format `a_text' using arguments `args'.
|
||||
--| ex: formatted_string ("hello $1, see page $title.", ["bob", "contact"] -> "hello bob, see page contact"
|
||||
do
|
||||
Result := api.formatted_string (a_text, args)
|
||||
end
|
||||
|
||||
feature -- Message
|
||||
|
||||
add_message (a_msg: READABLE_STRING_8; a_category: detachable READABLE_STRING_8)
|
||||
|
||||
Reference in New Issue
Block a user