nv1962

Forum Replies Created

Viewing 13 posts - 16 through 28 (of 28 total)
  • Author
    Posts
  • in reply to: Re: Localizing (translating) WP-Slimbox2 #1719

    nv1962
    Member

    Frankly, I rank MLNP among the "must-haves" so I’m quite sure that fellow localizers (translators) will drop by pretty soon. Nutty, quasi-random observation: the thing with customizing navigation and themes in general for relative "newbies" is that the idea of setting up a sandbox hardly ever rises. That’s why I like simple and ultra light-weight test server solutions, e.g. <a href="http://www.uniformserver.com/">Uniserver</a&gt; (Uniform Server – it’s actually production-grade, just unzip & run from any directory!) which can be installed on any Windows box without affecting the operating system at all (i.e. it can even be installed on a USB stick, handy for trial runs and presentations) and it’s a great way to do a pre-run of the site, so you can roughly see the effect and functionality of navigation and CSS mods <i>before</i> messing with the real (live) server.

    in reply to: Re: Localizing (translating) WP-Slimbox2 #1721

    nv1962
    Member

    Actually, I believe the contrary – all too often, plugin authors assume that the users have the same approach to the plugin’s functionality as they do. As long as the information is presented in a reasonably hierarchical fashion (so as to facilitate skimming / skipping) I don’t think there’s something such as "too verbose" explanations. I think there’s a fairly directly inverse relationship between amount of UI documentation and support request levels… But yeah, I also understand that it’s time-intensive and a general pain in the @#$%&. Easy for me to say!

    in reply to: Re: Localizing (translating) WP-Slimbox2 #1723

    nv1962
    Member

    Here goes – I’ve taken the liberty of also changing the image filename references to match my suffixes; perhaps that’s useful also for version management, to avoid mix-ups of different language images.

    NOTE: as the file is UTF-8, I’ve removed the HTML entity code, so it’s straight UTF-8 text now.

    NOTE2: maybe I’m just complicating things, but perhaps you can just toss all images and language files together in the same "languages" directory; if you do a sanity check (e.g.: do both image and language files exist? if not, pick default… etc.) and just by prepending the language prefixes to the files (so, putting the 2-letter codes before – not after, as I did) you can see all images organized by language, and keep all .po and .mo files together too, by language…

    in reply to: Re: Localizing (translating) WP-Slimbox2 #1724

    nv1962
    Member

    Got it now – upgraded 7-zip, that solved the problem. Working on the .po file right now; will post it as soon as it’s done.

    in reply to: Re: Localizing (translating) WP-Slimbox2 #1725

    nv1962
    Member

    Nope, I’m using open source; 7-zip. Gives an unrecognized compression method error. Maybe with a Gzip instead?

    in reply to: Re: Localizing (translating) WP-Slimbox2 #1727

    nv1962
    Member

    Oops – I can’t read your .zip file; could you check whether it’s indeed a .zip and not something else (StuffIt, Gzip, etc.)?

    in reply to: Re: Localizing (translating) WP-Slimbox2 #1728

    nv1962
    Member

    Here are the images for Spanish; I’ve added the 2-letter language to the filename (as a suffix – but perhaps it’s easier for you to fish out the language if they’re instead added as a prefix, in which case they’d be named xx-image.gif and not image-xx.gif).

    As to the language bits:

    wp_slimbox_counterText:
    Image {x} of {y} > Imagen {x} de {y}

    wp_slimbox_closeKeys:
    Close > Cerrar
    (same 3 key codes as English)

    wp_slimbox_previousKeys:
    Prev. > Ant.
    (i.e. key codes 65 for "a" and 37 for Leftarrow)

    wp_slimbox_nextKeys:
    Next > Próx.
    (i.e. key codes 80 for "p" and 39 for Rightarrow)

    in reply to: Re: Localizing (translating) WP-Slimbox2 #1732

    nv1962
    Member

    My that’s fast… Well, lemme know and I’ll be happy to check it. One thing: as .po / .mo ought to be UTF-8 there’s little point in messing with HTML entities within them. So perhaps it’s easier if you display the strings and them copy them as rendered (of course, easiest yet is me checking!) Hats off to Team Lightning here…

    in reply to: Re: Localizing (translating) WP-Slimbox2 #1735

    nv1962
    Member

    Took me a bit to search through my pile of plugins, but I think <a href="http://wordpress.org/extend/plugins/adminimize/">Adminimize</a&gt; is both interesting and "small" (and current, i.e. WP2.7 compatible).

    in reply to: Re: Localizing (translating) WP-Slimbox2 #1737

    nv1962
    Member

    Yes, the Gettext method (using .po and .mo files) is also far easier for translators… After perusing the information in the links you just posted, I’m tentatively reaching the conclusion that there’s not <i>that</i> much more complexity involved in preparing the code for Gettext and the method of using hard-coded PHP array files. Still, I readily accept that it’s a royal pain in the neck to go over all UI strings and hooking them into a semi-separate routine.

    On the other hand: the benefit of handling all UI strings separately is that it makes hunting for typos/style improvements in <i>any</i> language so much easier. However, in the case of WP-Slimbox2 there’s also the issue of placing image files in the corresponding languages folder, and adapting the paths correspondingly.

    I’m very certain in either case that, once more translations are available, you’ll see many more people adopting and using your plugins (and themes – but that’s a major step…) Once people <i>understand</i> how to mesh together customized templating and navigation (menu) organization, and add UI improvements such as in this case via WP-Slimbox2, the intertubes will become a prettier place. :-)

    (And therefore: thank you both for your willingness to look into localization!)

    in reply to: Re: Localizing (translating) WP-Slimbox2 #1741

    nv1962
    Member

    I’m sorry I can’t be of more use with coding, but if an example is of any help: XVE is handling it via an array in PHP (in the current version – 0.3.6) to load the UI strings. The localization support bits start at around line 702 in the file xhtml-video-embed.php (the plugin’s main code file). It’s nifty, in that it builds the list of available languages from reading available files – i.e. the language options aren’t hard-coded, so adding a new language should be just a matter of plopping in that additional file, and you’re done. Of course, in the case of WP-Slimbox2 I suspect there could be a problem in passing PHP array values around, i.e. to JS / jQuery… That’s why I’d rather not make code recommendations here, I simply don’t feel confident enough.

    in reply to: Re: Localizing (translating) WP-Slimbox2 #1743

    nv1962
    Member

    OK – I’ve done the Spanish translation; it’s attached to this post. <s>Two</s> three observations:

    First, I think localization doesn’t make much sense without also modding the used WP-Slimbox2 images (close, next, prev). However, before implementing that I’d recommend setting up a separate sub-folder for translations and related image files; else you end up quickly with a very cluttered plugin folder. So, I didn’t change the image files*. Also, there’s the issue of changing the default navigation keys; as those are handled (set) elsewhere, in another file (perhaps even in JS code). Same for the default Text counter value of "Image {x} of {y}". So, that’s why I didn’t change the given default values in English, even while the keys refer to English words (e.g. "n" for Next).

    Secondly, I’ve tested my quick translation hack by subbing out the file; nothing exploded, everything appears to work fine. ;-)

    Thirdly (added later): because there are a bunch of accents, and to keep potential validation issues at bay, I’ve converted all "funny" characters in my translations into their HTML entity versions, for sanity purposes.

    *In case you’d like to keep control of the image files (i.e. for consistency of color, font, placement etc.) I can give you the translation of those right here:

    "CLOSE" > "CERRAR"
    "Next" > "Sig." (that’s an abbreviation for "Siguiente")
    "Prev" > "Ant." (that’s an abbreviation for "Anterior")

    Lemme know if this works…

    in reply to: Re: Localizing (translating) WP-Slimbox2 #1744

    nv1962
    Member

    Well, I’m not much of a PHP coder so I can’t be of much help with mods necessary to accommodate localized strings in a given way (e.g. Gettext support) but as one example of a plugin that swaps out the English (default) language UI strings with a localized version of them (if available of course!) I could point to the <a href="http://wordpress.org/extend/plugins/xhtml-video-embed/">XVE plugin</a> (which I’ve also helped localize). Essentially, the UI strings in XVE are defined (declared) in separate language-specific files. The plugin’s code looks at what the user’s desired language is (it’s set by the user in the plugin’s option / settings page), then checks whether that language is available in a specific plugin subdirectory containing all the localized language files (one for each language pair, e.g. English > German) and then pulls the UI strings from that file. The key "trick" is enforcing a naming discipline (convention) for those language files, say "language_ES.php" for Spanish, whereby in that example the used two-letter language code (ES) <b>must</b> conform in <b>every</b> submitted localization (translation) file to the same standard, e.g. as used in the WP installation. That makes automated checking for an available translated version and including that much easier.

    Moreover, it’s a relatively simple solution that keeps your plugin code separated from the UI string definition files, with an (almost) unlimited flexibility for adding new language pairs (i.e. localizations) as they become available, in principle without having to modify a single bit of your code. And as far as I can tell, with that roughly described method, changing the code in adminpage.php to look for the UI strings in a separate language file could also work with .po / .mo files (they essentially identify each string with msgid="original" and msgstr="translation").

    Anyway, I’ll get busy now and when I’m done, post a translated adminpage.php for Spanish, attached here; the zero-effort method would be to simply create a complete WP-Slimbox2 plugin package with a translated Spanish adminpage.php, but that gets messy when you have several languages…

    Dunno. Will think about that as I work along.

Viewing 13 posts - 16 through 28 (of 28 total)
css.php