vmware / vmware/singleton

[BUG] [Ruby Client]String type can be accepted as parameter count value by getString_p() and translate().

Open
#1,695 0 comments 0 reactions 1 assignee View on GitHub

@Xiaochao8 is already working on this.

Since May 11, 2022.

area/ruby-client kind/bug priority/low
Dominant language
Java
Stars
72
Forks
69
Avg merge
23h 32m
Merged PRs (30d)
4

Description

Describe the bug
String type can be accepted as parameter count value by getString_p() and translate().

To Reproduce
Steps to reproduce the behavior:

  1. Load config file.
    Singleton.load_config(, )
  2. Invoke interface as below:
    actualresult = SgtnClient::Translation.getString_p("plural", "plural.no.placeholder", { :cat_count => "string" }, :fr)
    actualresult = Singleton.translate("pluralNamedArg", "plural", :fr, cat_count: "string", A1: "apple", A2: "lemon")
  3. Return fr one category translation:
    "il y a un chat dans la chambre"
    "il y a un chat dans la chambre lemon et apple"

Expected behavior
Should get an exception if parameter count value is non-number type.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.