You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by mike-jumper <gi...@git.apache.org> on 2017/01/04 03:17:58 UTC

[GitHub] incubator-guacamole-client pull request #99: GUACAMOLE-36: Support fully tra...

GitHub user mike-jumper opened a pull request:

    https://github.com/apache/incubator-guacamole-client/pull/99

    GUACAMOLE-36: Support fully translatable messages

    Extensions are already capable of throwing error messages which are translatable (the error message can be a translation key), but there is no way for substitution/pluralization to occur, and thus no way to include dynamic values within such messages.
    
    This change defines a JSON format and mechanism for throwing translatable error messages from extensions, allowing for substitution of arbitrary values and pluralization within the JavaScript side of the web application.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/mike-jumper/incubator-guacamole-client translatable-messages

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-guacamole-client/pull/99.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #99
    
----
commit c5471afaed4326282c78d04baa9c5c728f402bc3
Author: Michael Jumper <mj...@apache.org>
Date:   2016-08-16T05:24:04Z

    GUACAMOLE-36: Generalize and simplify handling of REST API errors.

commit 9b56200a1889f653988db802514eb4e4bd246ebd
Author: Michael Jumper <mj...@apache.org>
Date:   2016-08-17T02:31:48Z

    GUACAMOLE-36: Define REST API transfer mechanism for translatable messages.

commit fff7f71c7ae1c60a27332b8c4957e733f2fbbad7
Author: Michael Jumper <mj...@apache.org>
Date:   2016-08-17T04:47:26Z

    GUACAMOLE-36: Migrate guacLogin and guacNotification to TranslatableMessage.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-guacamole-client pull request #99: GUACAMOLE-36: Support fully tra...

Posted by jmuehlner <gi...@git.apache.org>.
Github user jmuehlner commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/99#discussion_r94526966
  
    --- Diff: guacamole/src/main/webapp/app/rest/types/Error.js ---
    @@ -43,6 +43,15 @@ angular.module('rest').factory('Error', [function defineError() {
             this.message = template.message;
    --- End diff --
    
    Ah ok, that makes sense.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-guacamole-client pull request #99: GUACAMOLE-36: Support fully tra...

Posted by jmuehlner <gi...@git.apache.org>.
Github user jmuehlner commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/99#discussion_r94526301
  
    --- Diff: guacamole/src/main/webapp/app/rest/types/Error.js ---
    @@ -43,6 +43,15 @@ angular.module('rest').factory('Error', [function defineError() {
             this.message = template.message;
    --- End diff --
    
    Where is this message field actually used? It looks like it's been replaced universally by translatableMessage.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-guacamole-client pull request #99: GUACAMOLE-36: Support fully tra...

Posted by jmuehlner <gi...@git.apache.org>.
Github user jmuehlner commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/99#discussion_r94525332
  
    --- Diff: guacamole-ext/src/main/java/org/apache/guacamole/language/Translatable.java ---
    @@ -0,0 +1,41 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF 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.
    + */
    +
    +package org.apache.guacamole.language;
    +
    +/**
    + * An interface which requires the definition of a translatable message that
    --- End diff --
    
    This comment is a little odd - could it be cleaned up a bit? It took me a few readthroughs to understand exactly what it's saying.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-guacamole-client pull request #99: GUACAMOLE-36: Support fully tra...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/99#discussion_r94526925
  
    --- Diff: guacamole/src/main/webapp/app/rest/types/Error.js ---
    @@ -43,6 +43,15 @@ angular.module('rest').factory('Error', [function defineError() {
             this.message = template.message;
    --- End diff --
    
    It's not used directly by the JavaScript anymore, but it continues to exist as a means of providing a human readable message alongside the machine-readable translation key. It can be helpful during debugging.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-guacamole-client pull request #99: GUACAMOLE-36: Support fully tra...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-guacamole-client/pull/99


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---