diff --git a/app/resources/locales/en_US/command.po b/app/resources/locales/en_US/command.po new file mode 100644 index 000000000..6ed37b16c --- /dev/null +++ b/app/resources/locales/en_US/command.po @@ -0,0 +1,55 @@ +# COmanage Registry Localizations (command domain) +# +# Portions licensed to the University Corporation for Advanced Internet +# Development, Inc. ("UCAID") under one or more contributor license agreements. +# See the NOTICE file distributed with this work for additional information +# regarding copyright ownership. +# +# UCAID licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# @link https://www.internet2.edu/comanage COmanage Project +# @package registry +# @since COmanage Registry v5.0.0 +# @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) + +# Command Line text + +msgid "db.noop" +msgstr "SQL NOT EXECUTED" + +msgid "db.ok" +msgstr "Database schema update successful" + +msgid "db.schema" +msgstr "Loading database schema from {0}" + +msgid "opt.admin-username" +msgstr "Username of initial platform administrator" + +msgid "opt.force" +msgstr "Force a rerun of setup (only if you know what you are doing)" + +msgid "opt.not" +msgstr "Calculate changes but do not apply" + +# msgid "se.admin" +# msgstr "Creating initial administrator permission" + +# msgid "se.admin.user" +# msgstr "Enter administrator's login username" + +msgid "se.already" +msgstr "Setup appears to have already run" + +msgid "se.salt" +msgstr "Generating salt file" diff --git a/app/resources/locales/en_US/controller.po b/app/resources/locales/en_US/controller.po new file mode 100644 index 000000000..eba4bf386 --- /dev/null +++ b/app/resources/locales/en_US/controller.po @@ -0,0 +1,49 @@ +# COmanage Registry Localizations (controller domain) +# +# Portions licensed to the University Corporation for Advanced Internet +# Development, Inc. ("UCAID") under one or more contributor license agreements. +# See the NOTICE file distributed with this work for additional information +# regarding copyright ownership. +# +# UCAID licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# @link https://www.internet2.edu/comanage COmanage Project +# @package registry +# @since COmanage Registry v5.0.0 +# @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) + +# Controllers (Models) + +msgid "ApiUsers" +msgstr "{0,plural,=1{API User} other{API Users}}" + +msgid "CoSettings" +msgstr "{0,plural,=1{CO Setting} other{CO Settings}}" + +msgid "Cos" +msgstr "{0,plural,=1{CO} other{COs}}" + +msgid "Cous" +msgstr "{0,plural,=1{COU} other{COUs}}" + +msgid "Dashboards" +msgstr "{0,plural,=1{Dashboard} other{Dashboards}}" + +msgid "ExternalIdentities" +msgstr "{0,plural,=1{External Identity} other{External Identities}}" + +msgid "People" +msgstr "{0,plural,=1{Person} other{People}}" + +msgid "Types" +msgstr "{0,plural,=1{Type} other{Types}}" diff --git a/app/resources/locales/en_US/default.po b/app/resources/locales/en_US/default.po index e883b0f96..c7b9d55a6 100644 --- a/app/resources/locales/en_US/default.po +++ b/app/resources/locales/en_US/default.po @@ -39,470 +39,8 @@ msgstr "Powered by" msgid "registry.meta.registry" msgstr "COmanage Registry" -### Command Line text -msgid "registry.cmd.db.noop" -msgstr "SQL NOT EXECUTED" - -msgid "registry.cmd.db.ok" -msgstr "Database schema update successful" - -msgid "registry.cmd.db.schema" -msgstr "Loading database schema from {0}" - -msgid "registry.cmd.opt.admin-username" -msgstr "Username of initial platform administrator" - -msgid "registry.cmd.opt.force" -msgstr "Force a rerun of setup (only if you know what you are doing)" - -msgid "registry.cmd.opt.not" -msgstr "Calculate changes but do not apply" - -# msgid "registry.cmd.se.admin" -# msgstr "Creating initial administrator permission" - -# msgid "registry.cmd.se.admin.user" -# msgstr "Enter administrator's login username" - -msgid "registry.cmd.se.already" -msgstr "Setup appears to have already run" - -msgid "registry.cmd.se.salt" -msgstr "Generating salt file" - -### Controllers (Models) -msgid "registry.ct.ApiUsers" -msgstr "{0,plural,=1{API User} other{API Users}}" - -msgid "registry.ct.CoSettings" -msgstr "{0,plural,=1{CO Setting} other{CO Settings}}" - -msgid "registry.ct.Cos" -msgstr "{0,plural,=1{CO} other{COs}}" - -msgid "registry.ct.Cous" -msgstr "{0,plural,=1{COU} other{COUs}}" - -msgid "registry.ct.Dashboards" -msgstr "{0,plural,=1{Dashboard} other{Dashboards}}" - -msgid "registry.ct.ExternalIdentities" -msgstr "{0,plural,=1{External Identity} other{External Identities}}" - -msgid "registry.ct.People" -msgstr "{0,plural,=1{Person} other{People}}" - -msgid "registry.ct.Types" -msgstr "{0,plural,=1{Type} other{Types}}" - -### Enumerations -msgid "registry.en.BooleanEnum.0" -msgstr "False" - -msgid "registry.en.BooleanEnum.1" -msgstr "True" - -msgid "registry.en.EduPersonAffiliationEnum.affiliate" -msgstr "Affiliate" - -msgid "registry.en.EduPersonAffiliationEnum.alum" -msgstr "Alum" - -msgid "registry.en.EduPersonAffiliationEnum.employee" -msgstr "Employee" - -msgid "registry.en.EduPersonAffiliationEnum.faculty" -msgstr "Faculty" - -msgid "registry.en.EduPersonAffiliationEnum.librarywalkin" -msgstr "Library Walk-In" - -msgid "registry.en.EduPersonAffiliationEnum.member" -msgstr "Member" - -msgid "registry.en.EduPersonAffiliationEnum.staff" -msgstr "Staff" - -msgid "registry.en.EduPersonAffiliationEnum.student" -msgstr "Student" - -msgid "registry.en.SetBooleanEnum.0" -msgstr "Not Set" - -msgid "registry.en.SetBooleanEnum.1" -msgstr "Set" - -msgid "registry.en.StatusEnum.A" -msgstr "Active" - -msgid "registry.en.StatusEnum.C" -msgstr "Confirmed" - -msgid "registry.en.StatusEnum.D" -msgstr "Deleted" - -msgid "registry.en.StatusEnum.D2" -msgstr "Duplicate" - -msgid "registry.en.StatusEnum.GP" -msgstr "Grace Period" - -msgid "registry.en.StatusEnum.I" -msgstr "Invited" - -msgid "registry.en.StatusEnum.LK" -msgstr "Locked" - -msgid "registry.en.StatusEnum.N" -msgstr "Denied" - -msgid "registry.en.StatusEnum.P" -msgstr "Pending" - -msgid "registry.en.StatusEnum.PA" -msgstr "Pending Approval" - -msgid "registry.en.StatusEnum.PC" -msgstr "Pending Confirmation" - -msgid "registry.en.StatusEnum.S" -msgstr "Suspended" - -msgid "registry.en.StatusEnum.X" -msgstr "Declined" - -msgid "registry.en.StatusEnum.XP" -msgstr "Expired" - -msgid "registry.en.StatusEnum.Y" -msgstr "Approved" - -msgid "registry.en.SuspendableStatusEnum.A" -msgstr "Active" - -msgid "registry.en.SuspendableStatusEnum.S" -msgstr "Suspended" - -msgid "registry.en.TemplateableStatusEnum.A" -msgstr "Active" - -msgid "registry.en.TemplateableStatusEnum.S" -msgstr "Suspended" - -msgid "registry.en.TemplateableStatusEnum.T" -msgstr "Template" - -msgid "registry.en.YesBooleanEnum.0" -msgstr "No" - -msgid "registry.en.YesBooleanEnum.1" -msgstr "Yes" - -### Error Messages -msgid "registry.er.api.object" -msgstr "Did not find \"{0}\" object in request" - -msgid "registry.er.api.username.prefix" -msgstr "API username must begin with \"{0}\"" - -msgid "registry.er.api.username.suffix" -msgstr "API username requires a suffix" - -msgid "registry.er.auth.api.expired" -msgstr "API User \"{0}\" has expired" - -msgid "registry.er.auth.api.failed" -msgstr "Authentication Failed" - -msgid "registry.er.auth.api.invalid" -msgstr "Authentication request did not include Username and/or API Key" - -msgid "registry.er.auth.api.ip" -msgstr "Invalid IP Addres \"{0}\" for API User \"{1}\"" - -msgid "registry.er.auth.api.key" -msgstr "Invalid API Key provided for \"{0}\"" - -msgid "registry.er.auth.api.status" -msgstr "API User \"{0}\" is not Active" - -msgid "registry.er.auth.api.toosoon" -msgstr "API User \"{0}\" is not yet valid" - -msgid "registry.er.auth.api.unknown" -msgstr "Username \"{0}\" not found in api_users table" - -msgid "registry.er.coid" -msgstr "CO ID not found" - -msgid "registry.er.cou.parent" -msgstr "COU Parent ID not valid" - -msgid "registry.er.db.config" -msgstr "Invalid database configuration \"{0}\"" - -msgid "registry.er.delete.active" -msgstr "This record is in Active status and cannot be deleted" - -msgid "registry.er.edit.comanage" -msgstr "Cannot edit or delete the COmanage CO" - -msgid "registry.er.edit.readonly" -msgstr "This record is read only and cannot be edited" - -msgid "registry.er.exists" -msgstr "{0} already exists with this name" - -msgid "registry.er.fields" -msgstr "Please recheck these fields: {0}" - -msgid "registry.er.fields.primary_link" -msgstr "The Primary Link {0} is frozen and cannot be changed" - -msgid "registry.er.file" -msgstr "Cannot read file {0}" - -msgid "registry.er.input.blank" -msgstr "Value cannot consist of only blank characters" - -msgid "registry.er.input.condreq" -msgstr "When this value is selected, {0} cannot be empty" - -msgid "registry.er.input.invalid" -msgstr "Invalid character found" - -msgid "registry.er.invalid" -msgstr "Invalid value \"{0}\"" - -msgid "registry.er.notfound" -msgstr "{0} not found" - -msgid "registry.er.notprov" -msgstr "{0} not provided" - -msgid "registry.er.pagenum.exceeded" -msgstr "Page number may not be larger than {0}" - -msgid "registry.er.pagenum.nan" -msgstr "Page number must be an integer" - -msgid "registry.er.perm" -msgstr "Permission Denied" - -msgid "registry.er.primary_link" -msgstr "Could not find value for Primary Link {0}" - -msgid "registry.er.save" -msgstr "Save Failed ({0})" - -msgid "registry.er.schema.column" -msgstr "No type defined for table {0} column {1}" - -msgid "registry.er.schema.parse" -msgstr "Failed to parse file {0}" - -msgid "registry.er.Types.inuse" -msgstr "Type {0} is in use and cannot be deleted" - -msgid "registry.er.unknown" -msgstr "Unknown value \"{0}\"" - -### Fields -### Keys of the form registry.fd.MyModels.field_name[.desc] will apply only to MyModels.field_name -### Keys of the form registry.fd.field_name[.desc] will apply if no model specific key is found -msgid "registry.fd.action" -msgstr "Action" - -msgid "registry.fd.api_key" -msgstr "API Key" - -msgid "registry.fd.attribute" -msgstr "Attribute" - -msgid "registry.fd.date_of_birth" -msgstr "Date of Birth" - -msgid "registry.fd.description" -msgstr "Description" - -msgid "registry.fd.display_name" -msgstr "Display Name" - -msgid "registry.fd.edupersonaffiliation" -msgstr "eduPersonAffiliation" - -msgid "registry.fd.Types.edupersonaffiliation.desc" -# XXX update link to PE wiki? -msgstr "Map the extended affiliation to this eduPersonAffiliation, see eduPersonAffiliation and Extended Affiliations" - -msgid "registry.fd.family" -msgstr "Family Name" - -msgid "registry.fd.given" -msgstr "Given Name" - -msgid "registry.fd.name" -msgstr "Name" - -msgid "registry.fd.parent_id" -msgstr "Parent" - -msgid "registry.fd.privileged" -msgstr "Privileged" - -msgid "registry.fd.ApiUsers.privileged.desc" -msgstr "A privileged API user has full access to the CO. Unprivileged API users may be granted specific permissions where supported." - -msgid "registry.fd.remote_ip" -msgstr "IP Address" - -msgid "registry.fd.ApiUsers.remote_ip.desc" -msgstr "If specified, a regular expression describing the IP address(es) from which this API User may connect. Be sure to escape dots (eg: "/10\\.0\\.1\\.150/")." - -msgid "registry.fd.required" -msgstr "Required" - -msgid "registry.fd.status" -msgstr "Status" - -msgid "registry.fd.Type.status" -msgstr "Suspending a Type will prevent it from being assigned to new attributes, but will not remove it from existing attributes" - -msgid "registry.fd.username" -msgstr "Username" - -msgid "registry.fd.ApiUsers.username.desc" -msgstr "The API User Name must be prefixed with the string \"co_#.\"" - -msgid "registry.fd.valid_from" -msgstr "Valid From" - -msgid "registry.fd.valid_from.desc" -msgstr "Leave blank for immediate validity" - -msgid "registry.fd.valid_from.tz" -msgstr "Valid From ({0})" - -msgid "registry.fd.valid_through" -msgstr "Valid Through" - -msgid "registry.fd.valid_through.desc" -msgstr "Leave blank for indefinite validity" - -msgid "registry.fd.valid_through.tz" -msgstr "Valid Through ({0})" - -msgid "registry.fd.value" -msgstr "Value" - -msgid "registry.fd.Types.value" -msgstr "Database Value" - -msgid "registry.fd.Types.value.desc" -msgstr "Database value for this type, characters must be alphanumeric, dot, or dash" - msgid "registry.home.collab" msgstr "Available Collaborations" msgid "registry.home.welcome" msgstr "Welcome to {0}." - -### Informational (Banner) Messages -msgid "registry.in.api.cmp" -msgstr "API Users created in the COmanage CO are given full privileges to all Registry data." - -msgid "registry.in.api.key" -msgstr "This newly generated API Key cannot be recovered. If it is lost a new key must be generated." - -msgid "registry.in.pagination.format" -msgstr "Page {{page}} of {{pages}}, Viewing {{start}}-{{end}} of {{count}}" - -### Menu Messages -msgid "registry.me.co.configuration" -msgstr "Configuration" - -msgid "registry.me.co.people" -msgstr "People" - -msgid "registry.me.co.switch" -msgstr "Switch Collaboration" - -### Operations (Commands) -msgid "registry.op.add.a" -msgstr "Add New {0}" - -msgid "registry.op.api.key.generate" -msgstr "Generate API Key" - -msgid "registry.op.api.key.generate.confirm" -msgstr "Are you sure you wish to generate a new API Key?" - -msgid "registry.op.dashboard.configuration" -msgstr "Manage {0} Configuration" - -msgid "registry.op.delete" -msgstr "Delete" - -msgid "registry.op.delete.confirm" -msgstr "Are you sure you wish to delete this record ({0})?" - -msgid "registry.op.duplicate" -msgstr "Duplicate" - -msgid "registry.op.edit" -msgstr "Edit" - -msgid "registry.op.edit.a" -msgstr "Edit {0}" - -msgid "registry.op.first" -msgstr "First" - -msgid "registry.op.go" -msgstr "Go" - -msgid "registry.op.last" -msgstr "Last" - -msgid "registry.op.login" -msgstr "Login" - -msgid "registry.op.logout" -msgstr "Logout" - -msgid "registry.op.next" -msgstr "Next" - -msgid "registry.op.page.display" -msgstr "Display" - -msgid "registry.op.page.goto" -msgstr "Go To Page" - -msgid "registry.op.previous" -msgstr "Previous" - -msgid "registry.op.Types.restore" -msgstr "Add/Restore Default Types" - -msgid "registry.op.save" -msgstr "Save" - -msgid "registry.op.skip_to_content" -msgstr "Skip to main content" - -msgid "registry.op.view" -msgstr "View" - -msgid "registry.op.view.a" -msgstr "View {0}" - -### Results -msgid "registry.rs.deleted" -msgstr "Deleted" - -msgid "registry.rs.deleted.a" -msgstr "{0} Deleted" - -msgid "registry.rs.saved" -msgstr "Saved" \ No newline at end of file diff --git a/app/resources/locales/en_US/enumeration.po b/app/resources/locales/en_US/enumeration.po new file mode 100644 index 000000000..cf2b22861 --- /dev/null +++ b/app/resources/locales/en_US/enumeration.po @@ -0,0 +1,127 @@ +# COmanage Registry Localizations (enumeration domain) +# +# Portions licensed to the University Corporation for Advanced Internet +# Development, Inc. ("UCAID") under one or more contributor license agreements. +# See the NOTICE file distributed with this work for additional information +# regarding copyright ownership. +# +# UCAID licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# @link https://www.internet2.edu/comanage COmanage Project +# @package registry +# @since COmanage Registry v5.0.0 +# @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) + +# Enumerations + +msgid "BooleanEnum.0" +msgstr "False" + +msgid "BooleanEnum.1" +msgstr "True" + +msgid "EduPersonAffiliationEnum.affiliate" +msgstr "Affiliate" + +msgid "EduPersonAffiliationEnum.alum" +msgstr "Alum" + +msgid "EduPersonAffiliationEnum.employee" +msgstr "Employee" + +msgid "EduPersonAffiliationEnum.faculty" +msgstr "Faculty" + +msgid "EduPersonAffiliationEnum.librarywalkin" +msgstr "Library Walk-In" + +msgid "EduPersonAffiliationEnum.member" +msgstr "Member" + +msgid "EduPersonAffiliationEnum.staff" +msgstr "Staff" + +msgid "EduPersonAffiliationEnum.student" +msgstr "Student" + +msgid "SetBooleanEnum.0" +msgstr "Not Set" + +msgid "SetBooleanEnum.1" +msgstr "Set" + +msgid "StatusEnum.A" +msgstr "Active" + +msgid "StatusEnum.C" +msgstr "Confirmed" + +msgid "StatusEnum.D" +msgstr "Deleted" + +msgid "StatusEnum.D2" +msgstr "Duplicate" + +msgid "StatusEnum.GP" +msgstr "Grace Period" + +msgid "StatusEnum.I" +msgstr "Invited" + +msgid "StatusEnum.LK" +msgstr "Locked" + +msgid "StatusEnum.N" +msgstr "Denied" + +msgid "StatusEnum.P" +msgstr "Pending" + +msgid "StatusEnum.PA" +msgstr "Pending Approval" + +msgid "StatusEnum.PC" +msgstr "Pending Confirmation" + +msgid "StatusEnum.S" +msgstr "Suspended" + +msgid "StatusEnum.X" +msgstr "Declined" + +msgid "StatusEnum.XP" +msgstr "Expired" + +msgid "StatusEnum.Y" +msgstr "Approved" + +msgid "SuspendableStatusEnum.A" +msgstr "Active" + +msgid "SuspendableStatusEnum.S" +msgstr "Suspended" + +msgid "TemplateableStatusEnum.A" +msgstr "Active" + +msgid "TemplateableStatusEnum.S" +msgstr "Suspended" + +msgid "TemplateableStatusEnum.T" +msgstr "Template" + +msgid "YesBooleanEnum.0" +msgstr "No" + +msgid "YesBooleanEnum.1" +msgstr "Yes" diff --git a/app/resources/locales/en_US/error.po b/app/resources/locales/en_US/error.po new file mode 100644 index 000000000..bfbf78b0f --- /dev/null +++ b/app/resources/locales/en_US/error.po @@ -0,0 +1,133 @@ +# COmanage Registry Localizations (error domain) +# +# Portions licensed to the University Corporation for Advanced Internet +# Development, Inc. ("UCAID") under one or more contributor license agreements. +# See the NOTICE file distributed with this work for additional information +# regarding copyright ownership. +# +# UCAID licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# @link https://www.internet2.edu/comanage COmanage Project +# @package registry +# @since COmanage Registry v5.0.0 +# @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) + +# Error Messages + +msgid "api.object" +msgstr "Did not find \"{0}\" object in request" + +msgid "api.username.prefix" +msgstr "API username must begin with \"{0}\"" + +msgid "api.username.suffix" +msgstr "API username requires a suffix" + +msgid "auth.api.expired" +msgstr "API User \"{0}\" has expired" + +msgid "auth.api.failed" +msgstr "Authentication Failed" + +msgid "auth.api.invalid" +msgstr "Authentication request did not include Username and/or API Key" + +msgid "auth.api.ip" +msgstr "Invalid IP Addres \"{0}\" for API User \"{1}\"" + +msgid "auth.api.key" +msgstr "Invalid API Key provided for \"{0}\"" + +msgid "auth.api.status" +msgstr "API User \"{0}\" is not Active" + +msgid "auth.api.toosoon" +msgstr "API User \"{0}\" is not yet valid" + +msgid "auth.api.unknown" +msgstr "Username \"{0}\" not found in api_users table" + +msgid "coid" +msgstr "CO ID not found" + +msgid "cou.parent" +msgstr "COU Parent ID not valid" + +msgid "db.config" +msgstr "Invalid database configuration \"{0}\"" + +msgid "delete.active" +msgstr "This record is in Active status and cannot be deleted" + +msgid "edit.comanage" +msgstr "Cannot edit or delete the COmanage CO" + +msgid "edit.readonly" +msgstr "This record is read only and cannot be edited" + +msgid "exists" +msgstr "{0} already exists with this name" + +msgid "fields" +msgstr "Please recheck these fields: {0}" + +msgid "fields.primary_link" +msgstr "The Primary Link {0} is frozen and cannot be changed" + +msgid "file" +msgstr "Cannot read file {0}" + +msgid "input.blank" +msgstr "Value cannot consist of only blank characters" + +msgid "input.condreq" +msgstr "When this value is selected, {0} cannot be empty" + +msgid "input.invalid" +msgstr "Invalid character found" + +msgid "invalid" +msgstr "Invalid value \"{0}\"" + +msgid "notfound" +msgstr "{0} not found" + +msgid "notprov" +msgstr "{0} not provided" + +msgid "pagenum.exceeded" +msgstr "Page number may not be larger than {0}" + +msgid "pagenum.nan" +msgstr "Page number must be an integer" + +msgid "perm" +msgstr "Permission Denied" + +msgid "primary_link" +msgstr "Could not find value for Primary Link {0}" + +msgid "save" +msgstr "Save Failed ({0})" + +msgid "schema.column" +msgstr "No type defined for table {0} column {1}" + +msgid "schema.parse" +msgstr "Failed to parse file {0}" + +msgid "Types.inuse" +msgstr "Type {0} is in use and cannot be deleted" + +msgid "unknown" +msgstr "Unknown value \"{0}\"" diff --git a/app/resources/locales/en_US/field.po b/app/resources/locales/en_US/field.po new file mode 100644 index 000000000..2b89aa995 --- /dev/null +++ b/app/resources/locales/en_US/field.po @@ -0,0 +1,118 @@ +# COmanage Registry Localizations (field domain) +# +# Portions licensed to the University Corporation for Advanced Internet +# Development, Inc. ("UCAID") under one or more contributor license agreements. +# See the NOTICE file distributed with this work for additional information +# regarding copyright ownership. +# +# UCAID licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# @link https://www.internet2.edu/comanage COmanage Project +# @package registry +# @since COmanage Registry v5.0.0 +# @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) + +# Fields +# Keys of the form MyModels.field_name[.desc] will apply only to MyModels.field_name +# Keys of the form field_name[.desc] will apply if no model specific key is found + +msgid "action" +msgstr "Action" + +msgid "api_key" +msgstr "API Key" + +msgid "attribute" +msgstr "Attribute" + +msgid "date_of_birth" +msgstr "Date of Birth" + +msgid "description" +msgstr "Description" + +msgid "display_name" +msgstr "Display Name" + +msgid "edupersonaffiliation" +msgstr "eduPersonAffiliation" + +msgid "Types.edupersonaffiliation.desc" +# XXX update link to PE wiki? +msgstr "Map the extended affiliation to this eduPersonAffiliation, see eduPersonAffiliation and Extended Affiliations" + +msgid "family" +msgstr "Family Name" + +msgid "given" +msgstr "Given Name" + +msgid "name" +msgstr "Name" + +msgid "parent_id" +msgstr "Parent" + +msgid "privileged" +msgstr "Privileged" + +msgid "ApiUsers.privileged.desc" +msgstr "A privileged API user has full access to the CO. Unprivileged API users may be granted specific permissions where supported." + +msgid "remote_ip" +msgstr "IP Address" + +msgid "ApiUsers.remote_ip.desc" +msgstr "If specified, a regular expression describing the IP address(es) from which this API User may connect. Be sure to escape dots (eg: "/10\\.0\\.1\\.150/")." + +msgid "required" +msgstr "Required" + +msgid "status" +msgstr "Status" + +msgid "Type.status" +msgstr "Suspending a Type will prevent it from being assigned to new attributes, but will not remove it from existing attributes" + +msgid "username" +msgstr "Username" + +msgid "ApiUsers.username.desc" +msgstr "The API User Name must be prefixed with the string \"co_#.\"" + +msgid "valid_from" +msgstr "Valid From" + +msgid "valid_from.desc" +msgstr "Leave blank for immediate validity" + +msgid "valid_from.tz" +msgstr "Valid From ({0})" + +msgid "valid_through" +msgstr "Valid Through" + +msgid "valid_through.desc" +msgstr "Leave blank for indefinite validity" + +msgid "valid_through.tz" +msgstr "Valid Through ({0})" + +msgid "value" +msgstr "Value" + +msgid "Types.value" +msgstr "Database Value" + +msgid "Types.value.desc" +msgstr "Database value for this type, characters must be alphanumeric, dot, or dash" diff --git a/app/resources/locales/en_US/information.po b/app/resources/locales/en_US/information.po new file mode 100644 index 000000000..90c27e7ad --- /dev/null +++ b/app/resources/locales/en_US/information.po @@ -0,0 +1,34 @@ +# COmanage Registry Localizations (information domain) +# +# Portions licensed to the University Corporation for Advanced Internet +# Development, Inc. ("UCAID") under one or more contributor license agreements. +# See the NOTICE file distributed with this work for additional information +# regarding copyright ownership. +# +# UCAID licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# @link https://www.internet2.edu/comanage COmanage Project +# @package registry +# @since COmanage Registry v5.0.0 +# @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) + +# Informational (Banner) Messages + +msgid "api.cmp" +msgstr "API Users created in the COmanage CO are given full privileges to all Registry data." + +msgid "api.key" +msgstr "This newly generated API Key cannot be recovered. If it is lost a new key must be generated." + +msgid "pagination.format" +msgstr "Page {{page}} of {{pages}}, Viewing {{start}}-{{end}} of {{count}}" diff --git a/app/resources/locales/en_US/menu.po b/app/resources/locales/en_US/menu.po new file mode 100644 index 000000000..4c11b3b78 --- /dev/null +++ b/app/resources/locales/en_US/menu.po @@ -0,0 +1,34 @@ +# COmanage Registry Localizations (menu domain) +# +# Portions licensed to the University Corporation for Advanced Internet +# Development, Inc. ("UCAID") under one or more contributor license agreements. +# See the NOTICE file distributed with this work for additional information +# regarding copyright ownership. +# +# UCAID licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# @link https://www.internet2.edu/comanage COmanage Project +# @package registry +# @since COmanage Registry v5.0.0 +# @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) + +# Menu Messages + +msgid "co.configuration" +msgstr "Configuration" + +msgid "co.people" +msgstr "People" + +msgid "co.switch" +msgstr "Switch Collaboration" diff --git a/app/resources/locales/en_US/operation.po b/app/resources/locales/en_US/operation.po new file mode 100644 index 000000000..1271813d5 --- /dev/null +++ b/app/resources/locales/en_US/operation.po @@ -0,0 +1,94 @@ +# COmanage Registry Localizations (operation domain) +# +# Portions licensed to the University Corporation for Advanced Internet +# Development, Inc. ("UCAID") under one or more contributor license agreements. +# See the NOTICE file distributed with this work for additional information +# regarding copyright ownership. +# +# UCAID licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# @link https://www.internet2.edu/comanage COmanage Project +# @package registry +# @since COmanage Registry v5.0.0 +# @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) + +# Operations (Commands) + +msgid "add.a" +msgstr "Add New {0}" + +msgid "api.key.generate" +msgstr "Generate API Key" + +msgid "api.key.generate.confirm" +msgstr "Are you sure you wish to generate a new API Key?" + +msgid "dashboard.configuration" +msgstr "Manage {0} Configuration" + +msgid "delete" +msgstr "Delete" + +msgid "delete.confirm" +msgstr "Are you sure you wish to delete this record ({0})?" + +msgid "duplicate" +msgstr "Duplicate" + +msgid "edit" +msgstr "Edit" + +msgid "edit.a" +msgstr "Edit {0}" + +msgid "first" +msgstr "First" + +msgid "go" +msgstr "Go" + +msgid "last" +msgstr "Last" + +msgid "login" +msgstr "Login" + +msgid "logout" +msgstr "Logout" + +msgid "next" +msgstr "Next" + +msgid "page.display" +msgstr "Display" + +msgid "page.goto" +msgstr "Go To Page" + +msgid "previous" +msgstr "Previous" + +msgid "Types.restore" +msgstr "Add/Restore Default Types" + +msgid "save" +msgstr "Save" + +msgid "skip_to_content" +msgstr "Skip to main content" + +msgid "view" +msgstr "View" + +msgid "view.a" +msgstr "View {0}" diff --git a/app/resources/locales/en_US/result.po b/app/resources/locales/en_US/result.po new file mode 100644 index 000000000..fcbf499cf --- /dev/null +++ b/app/resources/locales/en_US/result.po @@ -0,0 +1,34 @@ +# COmanage Registry Localizations (result domain) +# +# Portions licensed to the University Corporation for Advanced Internet +# Development, Inc. ("UCAID") under one or more contributor license agreements. +# See the NOTICE file distributed with this work for additional information +# regarding copyright ownership. +# +# UCAID licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# @link https://www.internet2.edu/comanage COmanage Project +# @package registry +# @since COmanage Registry v5.0.0 +# @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) + +# Results + +msgid "deleted" +msgstr "Deleted" + +msgid "deleted.a" +msgstr "{0} Deleted" + +msgid "saved" +msgstr "Saved" \ No newline at end of file diff --git a/app/src/Command/DatabaseCommand.php b/app/src/Command/DatabaseCommand.php index 1bf1e500b..772b45b86 100644 --- a/app/src/Command/DatabaseCommand.php +++ b/app/src/Command/DatabaseCommand.php @@ -54,7 +54,7 @@ protected function buildOptionParser(ConsoleOptionParser $parser): ConsoleOption $parser->addOption('not', [ 'short' => 'n', 'boolean' => true, - 'help' => __('registry.cmd.opt.not') + 'help' => __d('command', 'opt.not') ]); return $parser; @@ -83,10 +83,10 @@ public function execute(Arguments $args, ConsoleIo $io) { $schemaFile = ROOT . DS . 'config' . DS . 'schema' . DS . 'schema.json'; if(!is_readable($schemaFile)) { - throw new \RuntimeException(__('registry.er.file', [$schemaFile])); + throw new \RuntimeException(__d('error', 'file', [$schemaFile])); } - $io->out(__('registry.cmd.db.schema', [$schemaFile])); + $io->out(__d('command', 'db.schema', [$schemaFile])); $json = file_get_contents($schemaFile); @@ -98,7 +98,7 @@ public function execute(Arguments $args, ConsoleIo $io) { // - An unmatched brace { } // - A trailing comma (permitted in PHP but not JSON) // - Single quotes instead of double quotes - throw new \RuntimeException(__('registry.er.schema.parse', [$schemaFile])); + throw new \RuntimeException(__d('error', 'schema.parse', [$schemaFile])); } // Use the ConnectionManager to get the database config to pass to adodb. @@ -136,7 +136,7 @@ public function execute(Arguments $args, ConsoleIo $io) { (array)$cCfg); if(!isset($colCfg->type)) { - throw new \RuntimeException(__('registry.er.schema.column', [$tName, $cName])); + throw new \RuntimeException(__d('error', 'schema.column', [$tName, $cName])); } // For type definitions see https://www.doctrine-project.org/projects/doctrine-dbal/en/2.12/reference/types.html#types @@ -289,9 +289,9 @@ public function execute(Arguments $args, ConsoleIo $io) { } if(!$doSQL) { - $io->out(__('registry.cmd.db.noop')); + $io->out(__d('registry', 'db.noop')); } else { - $io->out(__('registry.cmd.db.ok')); + $io->out(__d('command', 'db.ok')); } } catch(\Exception $e) { diff --git a/app/src/Command/SetupCommand.php b/app/src/Command/SetupCommand.php index 9d7c24e5c..4b00f2911 100644 --- a/app/src/Command/SetupCommand.php +++ b/app/src/Command/SetupCommand.php @@ -50,9 +50,9 @@ class SetupCommand extends Command { public function buildOptionParser(ConsoleOptionParser $parser): ConsoleOptionParser { $parser->addOption('admin-username', [ - 'help' => __('registry.cmd.opt.admin-username') + 'help' => __d('command', 'opt.admin-username') ])->addOption('force', [ - 'help' => __('registry.cmd.opt.force'), + 'help' => __d('command', 'opt.force'), 'boolean' => true ]); @@ -75,7 +75,7 @@ public function execute(Arguments $args, ConsoleIo $io) { $securitySaltFile = LOCAL . DS . "Config" . DS . "security.salt"; if(file_exists($securitySaltFile)) { - $io->out(__('registry.cmd.se.already')); + $io->out(__d('command', 'se.already')); if(!$args->getOption('force')) { exit; @@ -126,7 +126,7 @@ public function execute(Arguments $args, ConsoleIo $io) { $metaTable->setUpgradeVersion($targetVersion, true); */ // Write out the salt file - $io->out(__('registry.cmd.se.salt')); + $io->out(__d('command', 'se.salt')); if(file_put_contents($securitySaltFile, $salt)===false) { $err = error_get_last(); diff --git a/app/src/Command/TransmogrifyCommand.php b/app/src/Command/TransmogrifyCommand.php index 859547ac5..33c0692cd 100644 --- a/app/src/Command/TransmogrifyCommand.php +++ b/app/src/Command/TransmogrifyCommand.php @@ -199,14 +199,14 @@ public function execute(Arguments $args, ConsoleIo $io) { $incfg = $indb->config(); if(empty($incfg)) { - throw new \InvalidArgumentException(__("registry.er.db.config", ["transmogrify"])); + throw new \InvalidArgumentException(__d('error', 'db.config', ["transmogrify"])); } $outdb = ConnectionManager::get('default'); $outcfg = $outdb->config(); if(empty($incfg)) { - throw new \InvalidArgumentException(__("registry.er.db.config", ["default"])); + throw new \InvalidArgumentException(__d('error', 'db.config', ["default"])); } $inconfig = new \Doctrine\DBAL\Configuration(); diff --git a/app/src/Controller/ApiUsersController.php b/app/src/Controller/ApiUsersController.php index 96d0b5a1f..b56797408 100644 --- a/app/src/Controller/ApiUsersController.php +++ b/app/src/Controller/ApiUsersController.php @@ -71,7 +71,7 @@ public function generate(string $id) { // Let the view render, but tell it to use a different fields file $this->set('vv_fields_inc', 'fields-generate.inc'); - $this->set('vv_title', __('registry.op.api.key.generate')); + $this->set('vv_title', __d('operation', 'api.key.generate')); $this->render('/Standard/add-edit-view'); } diff --git a/app/src/Controller/ApiV2Controller.php b/app/src/Controller/ApiV2Controller.php index 04407d826..621b68b76 100644 --- a/app/src/Controller/ApiV2Controller.php +++ b/app/src/Controller/ApiV2Controller.php @@ -83,7 +83,7 @@ public function add() { if(empty($json[$modelsName])) { $this->llog('debug', $modelsName . " object not found in request"); - throw new BadRequestException(__('registry.er.api.object', [$modelsName])); + throw new BadRequestException(__d('error', 'api.object', [$modelsName])); } $results = []; @@ -177,13 +177,13 @@ public function edit($id) { $obj = $query->firstOrFail(); if(method_exists($this->$modelsName, "isReadOnly") && $this->$modelsName->isReadOnly($obj)) { - throw new BadRequestException(__('registry.er.edit.readonly')); + throw new BadRequestException(__d('error', 'edit.readonly')); } $json = $this->request->getData(); // Parsed by BodyParserMiddleware if(empty($json[$modelsName])) { - throw new BadRequestException(__('registry.er.api.object', [$modelsName])); + throw new BadRequestException(__d('error', 'api.object', [$modelsName])); } $obj = $this->$modelsName->patchEntity($obj, $json[$modelsName]); @@ -302,7 +302,7 @@ public function view($id = null) { $tableName = $this->$modelsName->getTable(); if(empty($id)) { - throw new InvalidArgumentException(__('registry.er.notprov', ['id'])); + throw new InvalidArgumentException(__d('error', 'notprov', ['id'])); } $obj = $this->$modelsName->findById($id)->firstOrFail(); diff --git a/app/src/Controller/AppController.php b/app/src/Controller/AppController.php index a76fa6a27..b351d2bcc 100644 --- a/app/src/Controller/AppController.php +++ b/app/src/Controller/AppController.php @@ -281,7 +281,7 @@ protected function getPrimaryLink(bool $lookup=false) { } if(empty($this->cur_pl->value) && !$this->$modelsName->allowEmptyPrimaryLink()) { - throw new \RuntimeException(__('registry.er.primary_link', [ $this->cur_pl->attr ])); + throw new \RuntimeException(__d('error', 'primary_link', [ $this->cur_pl->attr ])); } } @@ -299,7 +299,7 @@ protected function getPrimaryLink(bool $lookup=false) { catch(RecordNotFoundException $e) { $this->llog('error', "Could not find value '" . $this->cur_pl->value . "' for primary link object " . $linkModelName); // Mask this with a generic UnauthorizedException - throw new UnauthorizedException(__('registry.er.perm')); + throw new UnauthorizedException(__d('error', 'perm')); } } } @@ -362,7 +362,7 @@ protected function setCO() { && !$this->$modelsName->allowEmptyCO() && !$this->request->is('restful')) { // If we get this far without a CO ID, something went wrong. - throw new \RuntimeException(__('registry.er.coid')); + throw new \RuntimeException(__d('error', 'coid')); } if($coid) { diff --git a/app/src/Controller/Component/RegistryAuthComponent.php b/app/src/Controller/Component/RegistryAuthComponent.php index 4f4d9a049..4ee9d0606 100644 --- a/app/src/Controller/Component/RegistryAuthComponent.php +++ b/app/src/Controller/Component/RegistryAuthComponent.php @@ -78,7 +78,7 @@ class RegistryAuthComponent extends Component protected function authenticateApiUser(): bool { if(empty($_SERVER['PHP_AUTH_USER']) || empty($_SERVER['PHP_AUTH_PW'])) { $this->llog('error', "Empty value(s) received for PHP_AUTH_USER and/or PHP_AUTH_PW"); - throw new \InvalidArgumentException(__('registry.er.auth.api.invalid')); + throw new \InvalidArgumentException(__d('error', 'auth.api.invalid')); } $ApiUsers = TableRegistry::getTableLocator()->get('ApiUsers'); @@ -174,13 +174,13 @@ public function beforeFilter(EventInterface $event) { if($ApiUsers->getUserPrivilege($this->authenticatedUser, 1)) { throw $e; } else { - throw new UnauthorizedException(__('registry.er.auth.api.failed')); + throw new UnauthorizedException(__d('error', 'auth.api.failed')); } } catch(\Exception $e) { $this->llog('debug', $e->getMessage()); // Obfuscate the error message, which is available in the logs - throw new UnauthorizedException(__('registry.er.auth.api.failed')); + throw new UnauthorizedException(__d('error', 'auth.api.failed')); } } else { // Certain requests do not require authentication diff --git a/app/src/Controller/DashboardsController.php b/app/src/Controller/DashboardsController.php index dbcaab3af..071e6feb9 100644 --- a/app/src/Controller/DashboardsController.php +++ b/app/src/Controller/DashboardsController.php @@ -61,7 +61,7 @@ class DashboardsController extends StandardController { public function configuration() { $cur_co = $this->getCO(); - $this->set('vv_title', __('registry.op.dashboard.configuration', $cur_co->name)); + $this->set('vv_title', __d('operation', 'dashboard.configuration', $cur_co->name)); // Construct the set of configuration items. For everything except CO Settings // we want to order by the localized text string. @@ -71,17 +71,17 @@ public function configuration() { // could be delegated to (eg) a COU Admin at some point... $configMenuItems = [ - __('registry.ct.ApiUsers', [99]) => [ + __d('controller', 'ApiUsers', [99]) => [ 'icon' => 'vpn_key', 'controller' => 'api_users', 'action' => 'index' ], - __('registry.ct.Cous', [99]) => [ + __d('controller', 'Cous', [99]) => [ 'icon' => 'people_outline', 'controller' => 'cous', 'action' => 'index' ], - __('registry.ct.Types', [99]) => [ + __d('controller', 'Types', [99]) => [ 'icon' => 'widgets', 'controller' => 'types', 'action' => 'index' @@ -93,7 +93,7 @@ public function configuration() { // Insert CO Settings to the front of the list $configMenuItems = array_merge([ - __('registry.ct.CoSettings', [99]) => [ + __d('controller', 'CoSettings', [99]) => [ 'icon' => 'settings', 'controller' => 'co_settings', 'action' => 'add' @@ -109,7 +109,7 @@ public function configuration() { // Also pass the platform menu items $platformMenuItems = [ - __('registry.ct.Cos', [99]) => [ + __d('controller', 'Cos', [99]) => [ 'icon' => 'build', // XXX kind of want house here, but maybe need newer material icons? 'controller' => 'cos', 'action' => 'index' diff --git a/app/src/Controller/StandardController.php b/app/src/Controller/StandardController.php index 08b655276..f07dc2e33 100644 --- a/app/src/Controller/StandardController.php +++ b/app/src/Controller/StandardController.php @@ -57,7 +57,7 @@ public function add() { // This throws \Cake\ORM\Exception\RolledbackTransactionException if aborted // in afterSave if($table->save($obj)) { - $this->Flash->success(__('registry.rs.saved')); + $this->Flash->success(__d('result', 'saved')); return $this->generateRedirect(null); } @@ -65,11 +65,11 @@ public function add() { $errors = $obj->getErrors(); if(!empty($errors)) { - $this->Flash->error(__('registry.er.fields', [ implode(',', - array_map(function($v) { return __('registry.fd.'.$v); }, + $this->Flash->error(__d('error', 'fields', [ implode(',', + array_map(function($v) { return __d('field', $v); }, array_keys($errors))) ])); } else { - $this->Flash->error(__('registry.er.save', [$modelsName])); + $this->Flash->error(__d('error', 'save', [$modelsName])); } // Pass $obj as context so the view can render validation errors @@ -87,7 +87,7 @@ public function add() { $this->populateAutoViewVars(); // Default title is add new object - $this->set('vv_title', __('registry.op.add.a', __('registry.ct.'.$modelsName, [1]))); + $this->set('vv_title', __d('operation', 'add.a', __d('controller', $modelsName, [1]))); // Let the view render $this->render('/Standard/add-edit-view'); @@ -250,9 +250,9 @@ public function delete($id) { $field = $table->getDisplayField(); if(!empty($obj->$field)) { - $this->Flash->success(__('registry.rs.deleted.a', [$obj->$field])); + $this->Flash->success(__d('result', 'deleted.a', [$obj->$field])); } else { - $this->Flash->success(__('registry.rs.deleted')); + $this->Flash->success(__d('result', 'deleted')); } // Return to index since there is no delete view @@ -342,7 +342,7 @@ public function edit($id) { // This throws \Cake\ORM\Exception\RolledbackTransactionException if aborted // in afterSave if($table->save($obj)) { - $this->Flash->success(__('registry.rs.saved')); + $this->Flash->success(__d('result', 'saved')); return $this->generateRedirect($obj->id); } @@ -350,11 +350,11 @@ public function edit($id) { $errors = $obj->getErrors(); if(!empty($errors)) { - $this->Flash->error(__('registry.er.fields', [ implode(',', - array_map(function($v) { return __('registry.fd.'.$v); }, + $this->Flash->error(__d('error', 'fields', [ implode(',', + array_map(function($v) { return __d('field', $v); }, array_keys($errors))) ])); } else { - $this->Flash->error(__('registry.er.save', [$modelsName])); + $this->Flash->error(__d('error', 'save', [$modelsName])); } } } @@ -379,9 +379,9 @@ public function edit($id) { $field = $table->getDisplayField(); if(!empty($obj->$field)) { - $this->set('vv_title', __('registry.op.edit.a', $obj->$field)); + $this->set('vv_title', __d('operation', 'edit.a', $obj->$field)); } else { - $this->set('vv_title', __('registry.op.edit.a', __('registry.ct.'.$modelsName, [1]))); + $this->set('vv_title', __d('operation', 'edit.a', __d('controller', $modelsName, [1]))); } // Let the view render @@ -493,7 +493,7 @@ public function index() { $this->set('vv_permission_set', $this->RegistryAuth->calculatePermissionsForResultSet($resultSet)); // Default index view title is model name - $this->set('vv_title', __('registry.ct.'.$modelsName, [99])); + $this->set('vv_title', __d('controller', $modelsName, [99])); // Let the view render $this->render('/Standard/index'); @@ -647,9 +647,9 @@ public function view($id = null) { $field = $table->getDisplayField(); if(!empty($obj->$field)) { - $this->set('vv_title', __('registry.op.view.a', $obj->$field)); + $this->set('vv_title', __d('operation', 'view.a', $obj->$field)); } else { - $this->set('vv_title', __('registry.op.view.a', __('registry.ct.'.$modelsName, [1]))); + $this->set('vv_title', __d('operation', 'view.a', __d('controller', $modelsName, [1]))); } // Let the view render diff --git a/app/src/Controller/TypesController.php b/app/src/Controller/TypesController.php index fb4033346..e19e17bec 100644 --- a/app/src/Controller/TypesController.php +++ b/app/src/Controller/TypesController.php @@ -65,7 +65,7 @@ public function restore() { try { $this->Types->addDefaults($this->getCOID()); - $this->Flash->success(__('registry.rs.saved')); + $this->Flash->success(__d('result', 'saved')); } catch(\Exception $e) { // findById throws Cake\Datasource\Exception\RecordNotFoundException diff --git a/app/src/Lib/Enum/StandardEnum.php b/app/src/Lib/Enum/StandardEnum.php index bdd01ca84..34f4900c8 100644 --- a/app/src/Lib/Enum/StandardEnum.php +++ b/app/src/Lib/Enum/StandardEnum.php @@ -50,7 +50,7 @@ public static function getLocalizedConsts() : array { $className = substr(strrchr(get_called_class(), '\\'), 1); foreach(array_values($consts) as $key) { - $ret[$key] = __('registry.en.'.$className.'.'.$key); + $ret[$key] = __('enumeration', $className.'.'.$key); } return $ret; diff --git a/app/src/Lib/Traits/RulesTrait.php b/app/src/Lib/Traits/RulesTrait.php index c49e1abb7..5a82b5bda 100644 --- a/app/src/Lib/Traits/RulesTrait.php +++ b/app/src/Lib/Traits/RulesTrait.php @@ -92,7 +92,7 @@ public function ruleFreezePrimaryLink($entity, $options) { // might be on add). if($want !== $have) { - return __('registry.er.fields.primary_link', [$this->getPrimaryLink()]); + return __d('error', 'fields.primary_link', [$this->getPrimaryLink()]); } return true; diff --git a/app/src/Lib/Traits/TypeTrait.php b/app/src/Lib/Traits/TypeTrait.php index a1632cb90..3b8717490 100644 --- a/app/src/Lib/Traits/TypeTrait.php +++ b/app/src/Lib/Traits/TypeTrait.php @@ -72,7 +72,7 @@ public function defaultTypes(string $attribute) { $ret = []; if(!isset($this->defaultTypes[$attribute])) { - throw new \InvalidArgumentException(__('registry.er.invalid', [$attribute])); + throw new \InvalidArgumentException(__d('error', 'invalid', [$attribute])); } // eg: "Name" diff --git a/app/src/Lib/Traits/ValidationTrait.php b/app/src/Lib/Traits/ValidationTrait.php index b8adf03d1..c53862d7b 100644 --- a/app/src/Lib/Traits/ValidationTrait.php +++ b/app/src/Lib/Traits/ValidationTrait.php @@ -1,6 +1,6 @@ isUnique(['username'], __('registry.er.exists', [__('registry.ct.ApiUsers', [1])])); + $rule = $rules->isUnique(['username'], __d('error', 'exists', [__d('controller', 'ApiUsers', [1])])); return $rule($entity, $options); }, @@ -148,7 +148,7 @@ public function getUserPrivilege(string $username, int $coId) { $apiUser = $this->find()->where(['username' => $username])->first(); if(empty($apiUser)) { - throw new \InvalidArgumentException(__('registry.er.auth.api.unknown', [$username])); + throw new \InvalidArgumentException(__d('error', 'auth.api.unknown', [$username])); } return $apiUser->privileged; @@ -167,7 +167,7 @@ public function ruleIsUsernameValid($entity, $options) { // We need to pull the CO data to check the name if(!$entity->co_id) { - return __('registry.er.coid'); + return __d('error', 'coid'); } $Cos = TableRegistry::getTableLocator()->get('Cos'); @@ -175,19 +175,19 @@ public function ruleIsUsernameValid($entity, $options) { $co = $Cos->get($entity->co_id); if(!$co) { - return __('registry.er.notfound', [__('registry.ct.cos', [1])]); + return __d('error', 'notfound', [__d('controller', 'cos', [1])]); } $prefix = "co_" . $co->id . "."; // Return false if the prefix doesn't match the CO ID if(strncmp($entity->username, $prefix, strlen($prefix))) { - return __('registry.er.api.username.prefix', [$prefix]); + return __d('error', 'api.username.prefix', [$prefix]); } // Or if there's nothing after the dot if(strlen($entity->username) == strlen($prefix)) { - return __('registry.er.api.username.suffix'); + return __d('error', 'api.username.suffix'); } return true; @@ -215,7 +215,7 @@ public function validateKey(string $username, string $apiKey, string $remoteIp) $apiUser = $this->find()->where(['username' => $username])->first(); if(empty($apiUser)) { - throw new \InvalidArgumentException(__('registry.er.auth.api.unknown', [$username])); + throw new \InvalidArgumentException(__d('error', 'auth.api.unknown', [$username])); } // First validate the key. We use the FallbackPasswordHasher because API Users @@ -246,7 +246,7 @@ public function validateKey(string $username, string $apiKey, string $remoteIp) // Is the ApiUser active? if($apiUser->status != SuspendableStatusEnum::Active) { - throw new \InvalidArgumentException(__('registry.er.auth.api.status', [$username])); + throw new \InvalidArgumentException(__d('error', 'auth.api.status', [$username])); } // Are we within the validity window, if applicable? @@ -254,18 +254,18 @@ public function validateKey(string $username, string $apiKey, string $remoteIp) if($apiUser->valid_from && $now->lt($apiUser->valid_from)) { - throw new \InvalidArgumentException(__('registry.er.auth.api.toosoon', [$username])); + throw new \InvalidArgumentException(__d('error', 'auth.api.toosoon', [$username])); } if($apiUser->valid_through && $now->gt($apiUser->valid_through)) { - throw new \InvalidArgumentException(__('registry.er.auth.api.expired', [$username])); + throw new \InvalidArgumentException(__d('error', 'auth.api.expired', [$username])); } // Perform the IP Address check if($apiUser->remote_ip && !preg_match($apiUser->remote_ip, $remoteIp)) { - throw new \InvalidArgumentException(__('registry.er.auth.api.ip', [$remoteIp, $username])); + throw new \InvalidArgumentException(__d('error', 'auth.api.ip', [$remoteIp, $username])); } return true; diff --git a/app/src/Model/Table/CosTable.php b/app/src/Model/Table/CosTable.php index 5fe5e4b2f..e5e0b3216 100644 --- a/app/src/Model/Table/CosTable.php +++ b/app/src/Model/Table/CosTable.php @@ -125,7 +125,7 @@ public function buildRules(RulesChecker $rules): RulesChecker { // XXX CO-1736 In general, these checks should be case insensitive // (ie: I shouldn't be able to create a CO called "comanage", similarly COUs etc) // Also, with CO-1845 maybe unique ignores non-alphanumeric - $rules->add($rules->isUnique(['name'], __('registry.er.exists', [__('registry.ct.Cos', [1])]))); + $rules->add($rules->isUnique(['name'], __d('error', 'exists', [__d('controller', 'Cos', [1])]))); // AR-CO-5 A CO cannot be deleted if it is in Active status // This basically requires two steps to delete a CO (set to Suspended), @@ -168,7 +168,7 @@ public function isReadOnly($entity) { public function ruleIsCOmanageCO($entity, $options) { // We want negative logic since we want to fail if we're editing the COmanage CO if($entity->name == 'COmanage') { - return __('registry.er.edit.comanage'); + return __d('error', 'edit.comanage'); } return true; @@ -186,7 +186,7 @@ public function ruleIsCOmanageCO($entity, $options) { public function ruleIsActive($entity, $options) { // We want negative logic since we want to fail if the record is Active if($entity->status == TemplateableStatusEnum::Active) { - return __('registry.er.delete.active'); + return __d('error', 'delete.active'); } return true; diff --git a/app/src/Model/Table/CousTable.php b/app/src/Model/Table/CousTable.php index a14514efa..ed2c6a9b5 100644 --- a/app/src/Model/Table/CousTable.php +++ b/app/src/Model/Table/CousTable.php @@ -79,7 +79,7 @@ public function initialize(array $config): void { public function buildTableRules(RulesChecker $rules): RulesChecker { // AR-CO-3 Two COUs within the same CO cannot share the same name - $rules->add($rules->isUnique(['name', 'co_id'], __('registry.er.exists', [__('registry.ct.Cous', [1])]))); + $rules->add($rules->isUnique(['name', 'co_id'], __d('error', 'exists', [__d('controller', 'Cous', [1])]))); // This is not an Application Rule per se, but the parent_id must be a valid // potential parent @@ -139,7 +139,7 @@ public function rulePotentialParent($entity, $options) { $potentialParents = $this->potentialParents($entity->co_id, (!empty($entity->id) ? $entity->id : null)); if(!isset($potentialParents[$entity->parent_id])) { - return __('registry.er.cou.parent'); + return __d('error', 'cou.parent'); } } diff --git a/app/src/Model/Table/TypesTable.php b/app/src/Model/Table/TypesTable.php index b44fbd25f..da730126c 100644 --- a/app/src/Model/Table/TypesTable.php +++ b/app/src/Model/Table/TypesTable.php @@ -122,7 +122,7 @@ public function addDefault(int $coId, string $attribute) { // Make sure $attribute is valid if(!in_array($attribute, $this->supportedAttributes)) { - throw new \InvalidArgumentException(__('registry.er.unknown', [$attribute])); + throw new \InvalidArgumentException(__d('error', 'unknown', [$attribute])); } // Split $attribute @@ -239,7 +239,7 @@ public function typeInUse($entity) { public function ruleTypeInUse($entity, $options) { if($this->typeInUse($entity)) { - return __('registry.er.Types.inuse', [$entity->value]); + return __d('error', 'Types.inuse', [$entity->value]); } return true; diff --git a/app/src/View/Helper/FieldHelper.php b/app/src/View/Helper/FieldHelper.php index 8ae5ea251..95ce8d13e 100644 --- a/app/src/View/Helper/FieldHelper.php +++ b/app/src/View/Helper/FieldHelper.php @@ -66,7 +66,7 @@ public function banner(string $info) { /** * Emit a form control. * - * @since COmanage Registry v6.0.0 + * @since COmanage Registry v5.0.0 * @param string $fieldName Form field * @param array $options FormHelper control options * @param string $labelText Label text (fieldName language key used by default) @@ -88,7 +88,7 @@ public function control(string $fieldName, // Handle datetime controls specially if($fieldName == 'valid_from' || $fieldName == 'valid_through') { // Append the timezone to the label - $label = __("registry.fd.".$fieldName.".tz", [$this->_View->get('vv_tz')]); + $label = __d('field', $fieldName.".tz", [$this->_View->get('vv_tz')]); // Render these fields as datepickers instead of plain text boxes $coptions['class'] = 'datepicker-' . ($fieldName == 'valid_from' ? "f" : "u"); @@ -122,7 +122,7 @@ public function control(string $fieldName, /** * End a set of form controls. * - * @since COmanage Registry v6.0.0 + * @since COmanage Registry v5.0.0 * @return string Control Set end HTML */ @@ -135,7 +135,7 @@ public function endControlSet() { /** * End a form line. * - * @since COmanage Registry v6.0.0 + * @since COmanage Registry v5.0.0 * @return string Line end HTML */ @@ -146,7 +146,7 @@ protected function endLine() { /** * Generate a form info (control, value) box. * - * @since COmanage Registry v6.0.0 + * @since COmanage Registry v5.0.0 * @param string $content Content HTML * @return string Form Info HTML */ @@ -160,7 +160,7 @@ protected function formInfoDiv(string $content) { /** * Generate a form name (label, description) box. * - * @since COmanage Registry v6.0.0 + * @since COmanage Registry v5.0.0 * @param string $fieldName Form field * @param string $labelText Label text (fieldName language key used by default) * @return string Form Name HTML @@ -193,19 +193,19 @@ protected function formNameDiv(string $fieldName, string $labelText=null) { // All others map first to registry.fd.Model.foo, then to registry.fd.foo // if no Model specific key is found. - $label = __("registry.fd.".$mn.".".$fn); + $label = __d('field', $mn.".".$fn); - if($label == "registry.fd.".$mn.".".$fn) { + if($label == $mn.".".$fn) { // Model specific label not found, try again $f = null; if(preg_match('/^(.*?)_id$/', $fn, $f)) { // Map foriegn keys (foo_id) to the controller label - $label = __("registry.ct.".Inflector::camelize(Inflector::pluralize($f[1])), [1]); + $label = __d('controller', Inflector::camelize(Inflector::pluralize($f[1])), [1]); } else { // Just look up the key - $label = __("registry.fd.".$fn); + $label = __d('field', $fn); } } } @@ -213,14 +213,14 @@ protected function formNameDiv(string $fieldName, string $labelText=null) { // We try to automagically determine if a description for the field exists by // looking for the corresponding .desc language translation. - $desc = __("registry.fd.".$mn.".".$fn.".desc"); + $desc = __d('field', $mn.".".$fn.".desc"); - if($desc == "registry.fd.".$mn.".".$fn.".desc") { - $desc = __("registry.fd.".$fn.".desc"); + if($desc == $mn.".".$fn.".desc") { + $desc = __d('field', $fn.".desc"); } // If the description is the literal key we just generated, there is no description - if($desc == "registry.fd.".$fn.".desc") { + if($desc == $mn.".".$fn.".desc") { $desc = null; } @@ -241,7 +241,7 @@ protected function formNameDiv(string $fieldName, string $labelText=null) { /** * Emit a status control (a read only status with an optional link button). * - * @since Registry Registry v6.0.0 + * @since Registry Registry v5.0.0 * @param string $fieldName Form field * @param string $status Status text * @param array $link Link information, including 'url', 'label', 'class', 'confirm' @@ -271,7 +271,7 @@ public function statusControl(string $fieldName, string $status, array $link=[]) /** * Start a set of form controls. * - * @since COmanage Registry v6.0.0 + * @since COmanage Registry v5.0.0 * @param string $modelName Model name for form * @param string $action Current action * @param boolean $editable True if controls are read/write, false for read only @@ -292,7 +292,7 @@ public function startControlSet(string $modelName, string $action, bool $editabl /** * Start a form line. * - * @since COmanage Registry v6.0.0 + * @since COmanage Registry v5.0.0 * @param string $class Optional class to apply to the line * @return string */ @@ -320,7 +320,7 @@ protected function startLine(string $class=null) { public function submit(string $label) { return '
  • - * ' . __('registry.fd.required') . ' + * ' . __d('field', required') . '
    ' . $this->Form->submit($label) . ' diff --git a/app/templates/ApiUsers/fields-generate.inc b/app/templates/ApiUsers/fields-generate.inc index e028c0a5d..293f2a1c1 100644 --- a/app/templates/ApiUsers/fields-generate.inc +++ b/app/templates/ApiUsers/fields-generate.inc @@ -25,7 +25,7 @@ * @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) */ -print $this->Field->banner(__('registry.in.api.key')); +print $this->Field->banner(__d('information', 'api.key')); print $this->Field->statusControl('username', $vv_obj->username); diff --git a/app/templates/ApiUsers/fields.inc b/app/templates/ApiUsers/fields.inc index 345c4207e..967b63547 100644 --- a/app/templates/ApiUsers/fields.inc +++ b/app/templates/ApiUsers/fields.inc @@ -28,7 +28,7 @@ // This view does not support read-only if($vv_action == 'add' || $vv_action == 'edit') { if($vv_cur_co->id == 1) { - print $this->Field->banner(__('registry.in.api.cmp')); + print $this->Field->banner(__d('information', 'api.cmp')); } // AR-ApiUser-3 For namespacing purposes, API Users are named with a prefix consisting of the string "co_#.". @@ -44,14 +44,14 @@ if($vv_action == 'add' || $vv_action == 'edit') { 'action' => 'generate', $vv_obj->id ], - 'label' => __('registry.op.api.key.generate'), + 'label' => __d('operation', 'api.key.generate'), 'class' => 'provisionbutton', - 'confirm' => __('registry.op.api.key.generate.confirm') + 'confirm' => __d('operation', 'api.key.generate.confirm') ]; } print $this->Field->statusControl('api_key', - !empty($vv_obj->api_key) ? __('registry.en.SetBooleanEnum.1') : __('registry.en.SetBooleanEnum.0'), + !empty($vv_obj->api_key) ? __d('enumeration', 'SetBooleanEnum.1') : __d('enumeration', 'SetBooleanEnum.0'), $generateLink); print $this->Field->control('status', ['empty' => false]); diff --git a/app/templates/Cos/select.php b/app/templates/Cos/select.php index 478c99724..c09cf433c 100644 --- a/app/templates/Cos/select.php +++ b/app/templates/Cos/select.php @@ -36,8 +36,8 @@
    -
    -
    +
    +
    diff --git a/app/templates/Cous/columns.inc b/app/templates/Cous/columns.inc index ecc89b0b4..72f9f5fd3 100644 --- a/app/templates/Cous/columns.inc +++ b/app/templates/Cous/columns.inc @@ -31,7 +31,7 @@ $indexColumns = [ ], 'parent_id' => [ 'type' => 'fk', - 'label' => __('registry.fd.parent_id') + 'label' => __d('field', 'parent_id') ], 'description' => [ 'type' => 'echo' diff --git a/app/templates/Cous/fields.inc b/app/templates/Cous/fields.inc index 149566ec3..89aa3fd11 100644 --- a/app/templates/Cous/fields.inc +++ b/app/templates/Cous/fields.inc @@ -32,6 +32,6 @@ if($vv_action == 'add' || $vv_action == 'edit') { print $this->Field->control('description'); if(!empty($parents)) { - print $this->Field->control('parent_id', ['empty' => true], __('registry.fd.parent_id')); + print $this->Field->control('parent_id', ['empty' => true], __d('field', 'parent_id')); } } diff --git a/app/templates/Pages/home.php b/app/templates/Pages/home.php index b22125af8..e8cc4ad6b 100644 --- a/app/templates/Pages/home.php +++ b/app/templates/Pages/home.php @@ -33,7 +33,7 @@ // Print the login button $buttonClasses = "btn btn-primary btn-large"; print '
    '; - print $this->Html->link(__('registry.op.login'), + print $this->Html->link(__d('operation', 'login'), ['controller' => 'cos', 'action' => 'select', 'plugin' => false], diff --git a/app/templates/Standard/add-edit-view.php b/app/templates/Standard/add-edit-view.php index d39b1940a..3477f5e65 100644 --- a/app/templates/Standard/add-edit-view.php +++ b/app/templates/Standard/add-edit-view.php @@ -61,10 +61,10 @@ if(!empty($vv_obj->id) && $vv_permissions['delete']) { print '\n"; @@ -116,7 +116,7 @@ print $this->Form->hidden($vv_primary_link, ['value' => $linkId]); } - print $this->Field->submit(__('registry.op.save')); + print $this->Field->submit(__d('operation', 'save')); } print $this->Form->end(); diff --git a/app/templates/Standard/index.php b/app/templates/Standard/index.php index ec622fe3c..ce11e521d 100644 --- a/app/templates/Standard/index.php +++ b/app/templates/Standard/index.php @@ -58,27 +58,27 @@ function _column_key($modelsName, $c, $tz=null) { // Key is of the form field_id, use .ct label instead $k = \Cake\Utility\Inflector::classify(\Cake\Utility\Inflector::pluralize(substr($c, 0, strlen($c)-3))); - return __('registry.ct.'.$k, [1]); + return __d('controller' ,$k, [1]); } // Look for a model specific key first - $label = __('registry.fd.'.$modelsName.'.'.$c); + $label = __d('field', $modelsName.'.'.$c); - if($label != 'registry.fd.'.$modelsName.'.'.$c) { + if($label != $modelsName.'.'.$c) { return $label; } if($tz) { // If there is a timezone aware label, use that - $label = __('registry.fd.'.$c.'.tz', [$tz]); + $label = __d('field', $c.'.tz', [$tz]); - if($label != 'registry.fd.'.$c.'.tz') { + if($label != $c.'.tz') { return $label; } } // Otherwise look for the general key - return __('registry.fd.'.$c); + return __d('field', $c); } ?>
    @@ -102,7 +102,7 @@ function _column_key($modelsName, $c, $tz=null) {
  • Html->link( ' ' . - __('registry.op.add.a', __('registry.ct.'.$modelsName, [1])), + __d('operation', 'add.a', __d('controller', $modelsName, [1])), ['action' => 'add', '?' => $linkFilter], ['escape' => false]); ?>
  • @@ -160,7 +160,7 @@ function _column_key($modelsName, $c, $tz=null) { ?> - + @@ -170,9 +170,9 @@ function _column_key($modelsName, $c, $tz=null) { switch($cfg['type']) { case 'boolean': if(!empty($entity->$col) && $entity->$col) { - print __('registry.en.'.$cfg['class'].'.1'); + print __d('enumeration', $cfg['class'].'.1'); } else { - print __('registry.en.'.$cfg['class'].'.0'); + print __d('enumeration', $cfg['class'].'.0'); } break; case 'datetime': @@ -180,7 +180,7 @@ function _column_key($modelsName, $c, $tz=null) { break; case 'enum': if($entity->$col) { - print __('registry.en.'.$cfg['class'].'.'.$entity->$col); + print __d('enumeration', $cfg['class'].'.'.$entity->$col); } break; case 'fk': @@ -245,13 +245,13 @@ function _column_key($modelsName, $c, $tz=null) { id]['edit']) { print $this->Html->link( - __('registry.op.edit'), + __d('operation', 'edit'), ['action' => 'edit', $entity->id], ['class' => 'editbutton'] ); } elseif($vv_permission_set[$entity->id]['view']) { print $this->Html->link( - __('registry.op.view'), + __d('operation', 'view'), ['action' => 'view', $entity->id], ['class' => 'viewbutton'] ); @@ -261,10 +261,10 @@ function _column_key($modelsName, $c, $tz=null) { // XXX this is throwing CSRF error even though delete button on edit-record page is working? // probably because this is using Form helper, but we're outside of a form? print $this->Form->postLink( - __('registry.op.delete'), + __d('operation', 'delete'), ['action' => 'delete', $entity->id], // XXX should be configurable which field we put in, maybe displayField? - ['confirm' => __('registry.op.delete.confirm', [$entity->id]), + ['confirm' => __d('operation', 'delete.confirm', [$entity->id]), 'class' => 'deletebutton'] ); } @@ -278,22 +278,22 @@ function _column_key($modelsName, $c, $tz=null) { if($vv_permission_set[$entity->id][ $a['action'] ]) { // If we have a .confirm text, use postLink instead - $confirmKey = 'registry.op.'.$a['action'].'.confirm'; - $confirmTxt = __($confirmKey); + $confirmKey = $a['action'].'.confirm'; + $confirmTxt = __d('operation', $confirmKey); if($confirmTxt != $confirmKey) { // We found the localized string print $this->Form->postLink( - __('registry.op.' . $a['action']), + __d('operation', $a['action']), ['action' => $a['action'], $entity->id], // XXX should be configurable which field we put in, maybe displayField? - ['confirm' => __($confirmKey, [$entity->id]), + ['confirm' => __d('operation', $confirmKey, [$entity->id]), 'class' => $a['class']] ); } else { print $this->Html->link( - __('registry.op.' . $a['action']), + __d('operation', $a['action']), ['action' => $a['action'], $entity->id], ['class' => $a['class']] ); diff --git a/app/templates/Types/columns.inc b/app/templates/Types/columns.inc index ff3d7726b..4950f82f1 100644 --- a/app/templates/Types/columns.inc +++ b/app/templates/Types/columns.inc @@ -44,7 +44,7 @@ $indexColumns = [ $topLinks = [ [ 'icon' => 'settings_backup_restore', - 'label' => __('registry.op.Types.restore'), + 'label' => __d('operation', 'Types.restore'), 'link' => [ 'action' => 'restore' ] diff --git a/app/templates/element/breadcrumbs.php b/app/templates/element/breadcrumbs.php index 719157ab3..a6977547b 100644 --- a/app/templates/element/breadcrumbs.php +++ b/app/templates/element/breadcrumbs.php @@ -62,7 +62,7 @@ // Insert a link back to the configuration menu $this->Breadcrumbs->add( - __('registry.me.co.configuration'), + __d('menu', 'co.configuration'), ['controller' => 'dashboards', 'action' => 'configuration', '?' => [ @@ -85,7 +85,7 @@ } $this->Breadcrumbs->add( - __('registry.ct.'.$modelsName, [99]), + __d('controller', $modelsName, [99]), $target ); } diff --git a/app/templates/element/javascript.php b/app/templates/element/javascript.php index 922b10a19..0dc21a46f 100644 --- a/app/templates/element/javascript.php +++ b/app/templates/element/javascript.php @@ -208,10 +208,10 @@ classes: { resizable: false, modal: true, buttons: { - '': function() { + '': function() { $(this).dialog('close'); }, - '': function() { + '': function() { $(this).dialog('close'); } } @@ -243,8 +243,8 @@ classes: { }); // Define default text for confirm dialog - var defaultConfirmOk = ""; - var defaultConfirmCancel = ""; - var defaultConfirmTitle = ""; + var defaultConfirmOk = ""; + var defaultConfirmCancel = ""; + var defaultConfirmTitle = ""; diff --git a/app/templates/element/menuMain.php b/app/templates/element/menuMain.php index 487358370..543864bfa 100644 --- a/app/templates/element/menuMain.php +++ b/app/templates/element/menuMain.php @@ -50,14 +50,14 @@ 'controller' => 'people', 'action' => 'index', 'icon' => 'person', - 'label' => __('registry.me.co.people') + 'label' => __d('menu', 'co.people') ], [ 'permission' => 'configuration', 'controller' => 'dashboards', 'action' => 'configuration', 'icon' => 'settings', - 'label' => __('registry.me.co.configuration') + 'label' => __d('menu', 'co.configuration') ] ]; @@ -68,7 +68,7 @@ 'action' => 'select', 'permission' => null, 'icon' => 'transfer_within_a_station', - 'label' => __('registry.me.co.switch') + 'label' => __d('menu', 'co.switch') ]; } diff --git a/app/templates/element/menuUser.php b/app/templates/element/menuUser.php index 18012907e..b3aff1593 100644 --- a/app/templates/element/menuUser.php +++ b/app/templates/element/menuUser.php @@ -39,7 +39,7 @@
  • Html->link(__('registry.op.logout') . ' ', + print $this->Html->link(__d('operation', 'logout') . ' ', '/auth/logout/logout.php', ['escape' => false, 'class' => 'mdl-button mdl-js-button mdl-js-ripple-effect']); @@ -52,7 +52,7 @@ Html->link(__('registry.op.login') . ' ', + print $this->Html->link(__d('operation', 'login') . ' ', ['controller' => 'cos', 'action' => 'select', 'plugin' => false], diff --git a/app/templates/element/pagination.php b/app/templates/element/pagination.php index 965bb8bf7..a3fe01e0c 100644 --- a/app/templates/element/pagination.php +++ b/app/templates/element/pagination.php @@ -32,24 +32,24 @@ ?>