sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Inputbox too narrow

    Scheduled Pinned Locked Moved Developers' Forum
    12 Posts 5 Posters 454 Views 5 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P Offline
      pgarmyn
      last edited by

      @Garry
      You didn't precise: What inputbox?
      In case its your Ruby code:
      Try to use a longer default value : Use or add spaces at the end.
      It could be that you will also have to add a point at the end of the spaces.

      1 Reply Last reply Reply Quote 0
      • G Offline
        Garry K
        last edited by

        It is the Sketchup API inputbox that I am referring to. Adding spaces and possibly a period at the end is really not a very good solution.

        English - OK
        French - OK
        Russian - doesn't fit ( how many spaces )
        Chinese - or some other language ( how many spaces )

        Would it be better if I converted this over to a web dialog.

        1 Reply Last reply Reply Quote 0
        • TIGT Offline
          TIG Moderator
          last edited by

          Also make sure that your .rb script is saved as a UTF-8 without BOM encoded text file.
          It's a simple option if you use Notepad++.exe to edit it...

          But padding the strings with spaces is often the only way to get everything into an inputbox drop-down/text-area or left-side-prompt.

          Using webdialogs allows you greater flexibility in format and user interaction, but again if you specify fixed width areas for anything containing text, then it will crop [or wrap - depending on your css etc] your longer strings - especially as might happen in 'translated strings'...
          So you will still need to test every dialog in every language to spot unexpected glitches... 😒

          TIG

          1 Reply Last reply Reply Quote 0
          • G Offline
            Garry K
            last edited by

            I've got Russian working.

            Initially I ran into a problem where the last item in a list just showed up as a bunch of vertical lines. So I tried adding another pipe symbol at the end and it worked.

            d_options = @@options_t.collect.join('|') + '|'

            Will Chinese work the same way? Or will it not fit into UTF-8?

            1 Reply Last reply Reply Quote 0
            • P Offline
              pgarmyn
              last edited by

              😮 usefull
              Thanks

              1 Reply Last reply Reply Quote 0
              • G Offline
                Garry K
                last edited by

                I have a number of languages translating just fine.

                I open up my dictionary template in Notepad++ and save it in the appropriate language using UTF-8 without BOM.

                With French, Russian, icelandic everything works well.
                With Chinese I just see a bunch of boxes.

                How can I test - is there something special to make use of Chinese fonts? Do I have to install a Chinese version of Sketchup? Is there something else that I am missing.

                1 Reply Last reply Reply Quote 0
                • D Offline
                  driven
                  last edited by

                  your default font needs to be one with the extended char set that includes the Chinese dialect your writing in... [for you to see them]

                  Lucida Console is a reported to be pretty good [monospaced] all-rounder or Arial [Pro] is not to bad if you have it...

                  been looking into the same things myself...

                  john

                  learn from the mistakes of others, you may not live long enough to make them all yourself...

                  1 Reply Last reply Reply Quote 0
                  • S Offline
                    slbaumgartner
                    last edited by

                    @garry k said:

                    I've got Russian working.

                    Will Chinese work the same way? Or will it not fit into UTF-8?

                    UTF-8 is a variant of Unicode, and definitely supports Chinese. However, as @driven pointed out, the display font you are using must also handle the extended character codes used by Chinese.

                    Steve

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      driven
                      last edited by

                      looking at PC specific fonts it seems that Lucida Console may not include Chinese characters... so sorry about that advice...

                      OT [ish] On mac when using rich text you get some automatic font substitutions that build 'char sets' for missing bits.

                      On one occasion when trying to translate a Russian plugin it really did my head in when I tried to copy paste back into the webdialog's html...

                      john

                      learn from the mistakes of others, you may not live long enough to make them all yourself...

                      1 Reply Last reply Reply Quote 0
                      • G Offline
                        Garry K
                        last edited by

                        I've now got it working.
                        Here are some examples using the inputbox for my Door Maker.

                        My next job will be to get this to work inside web dialog.
                        I understand that I will need a metatag - I'm hoping for the best.

                        People who actually use these languages will probably laugh at the straight translations. Since I don't understand the various contexts - I'm hoping for a bit of help.

                        But at least this is a start - and I know that the code works without having to make any changes.


                        English Door Maker


                        French Door Maker


                        Russian Door Maker


                        Chinese Door Maker (traditional)

                        1 Reply Last reply Reply Quote 0
                        • G Offline
                          Garry K
                          last edited by

                          I've now made a simple video of the door maker.

                          1 Reply Last reply Reply Quote 0
                          • 1 / 1
                          • First post
                            Last post
                          Buy SketchPlus
                          Buy SUbD
                          Buy WrapR
                          Buy eBook
                          Buy Modelur
                          Buy Vertex Tools
                          Buy SketchCuisine
                          Buy FormFonts

                          Advertisement