Code Monkey home page Code Monkey logo

ocaml-gettext's People

Contributors

gasche avatar gildor478 avatar kit-ty-kate avatar leonidas-from-xiv avatar ptoscano avatar rwmjones avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ocaml-gettext's Issues

ocamlmklib doesn't work as accepted on cygwin

This bug has been migrated from artifact #422 on forge.ocamlcore.org. It was assigned to user102.

user102 posted on 2009-11-23 13:28:53:

OCaml doesn't produce .so file.

Date: Wed, 04 Oct 2006 19:58:45 +0200
From: GISQUET Christophe <christophe.gisquet at-smtp free.fr>

Ceci affecte libgettext-ocaml en version 0.2.

La version de ocamlmklib disponible avec cygwin est celle d'ocaml 3.08.x. Celle-ci ne peut produire de librairie partagées (.so). Le makefile échoue donc car il ne peut trouver la librairie partagée attendue.

De plus, sous cet environnement, les librairies partagées se terminent par ".dll".

Une manière de contourner ce probléme serait de:

  • dans configure.in (et par extension configure) faire un case sur $host et gérer le cas cygwin|mingw en réglant un conditional automake (par exemple WIN32_PLATFORM) à yes
  • pour chaque makefile affecté, modifier dans le Makefile.am correspondant la valeur de INSTALLIB en fonction de WIN32_PLATFORM:
    if WIN32_PLATFORM
    INSTALLIB=...
    else
    INSTALLIB=... file.so
    endif

Je ne connais pas suffisament ocaml/ocamlmklib pour savoir s'il est possible de générer librairie statique et dynamique/partagée à la fois, mais il serait bon de disposer des classiques options de configure --enable-{static,shared}. Il faudrait dans le cas WIN32_PLATFORM rejeter "--enable-shared" et forcer "--enable-static", ce qui est hélas une complexité supplémentaire.

Je pourrais envoyer un patch, mais j'aurais préféré au moins disposer d'un accés anonyme à un repository cvs/svn pour me faciliter la génération du patch avant de considérer cette option.

Cordialement,
Christophe GISQUET

--disable-camomile should not break stuff

This bug has been migrated from artifact #508 on forge.ocamlcore.org. It was assigned to user102.

user209 posted on 2010-01-12 10:46:06:

We don't need the camomile functionality in ocaml-gettext and so we routinely use:

./configure --disable-camomile

However this has many unnecessary side effects, in particular it breaks 'make' (in
the doc directory), and tests.

(Hint, try building like this with and without camomile actually installed).

user209 replied on 2010-01-12 10:52:27:

Sorry, I don't mean in the doc directory, I mean both times
it breaks in the test directory.

Bad interaction between camlp4 and ocaml-xgettext

This bug has been migrated from artifact #537 on forge.ocamlcore.org. It was assigned to user102.

user102 posted on 2010-03-06 16:31:36:

It seems quite hard to mix ocaml-xgettext and camlp4.

E.g:
ocaml-xgettext -I +camlp4 /usr/lib/ocaml/type-conv/pa_type_conv.cmo /home/gildor/programmation/00build/x86_64-unknown-linux-gnu/lib/ocaml/3.11.2/odn/pa_odn.cma ../src/oasis/OASISTypes.ml
Camlp4: Uncaught exception: Not_found

but

ocaml-xgettext pa_o.cmo -I /usr/lib/ocaml/type-conv pa_type_conv.cmo /home/gildor/programmation/00build/x86_64-unknown-linux-gnu/lib/ocaml/3.11.2/odn/pa_odn.cma ../src/oasis/OASISTypes.ml

A good idea to simplify this, is to integrate findlib and:
ocaml-xgettext -syntax camlp4o -package pa_odn.with.syntax

Another idea is to be able to create .ppo (partial po), during the build and merge them:
ocamlfind ocamlc -syntax camlp4o toto.ml -> toto.mo
ocamlfind ocaml-xgettext -syntax camlp4o toto.ml -> toto.pop

This will allow incremental extraction and will work nicely with ocamlbuild.

Breaks line into .pot/.po

This feature request has been migrated from artifact #534 on forge.ocamlcore.org. It was assigned to user102.

user102 posted on 2010-03-06 16:00:50:

When there is a very long OCaml string, it generates a very long line in the .pot file.

Maybe we should cut the generated line into .pot.

Uniform interface even if no implementation

This feature request has been migrated from artifact #831 on forge.ocamlcore.org. It was assigned to user102.

user102 posted on 2010-12-16 11:12:21:

There should be a default "dumb" interface that allow to define s_, ns_, f_ et al. It should be linked to nothing and implements default behavior.

The point is to avoid writing stubs in every project and to limit the dependencies to only gettext (no C stubs, no Camomile, just ocaml-gettext). It would be more simple than the conditional compilation with IFDEF HAS_GETTEXT ....

E.g.
let f_ e =
e^^""

let fn_ f1 f2 n =
f1^^""

let s_ s =
s

let sn_ s p n =
if n = 1 then
s
else
p

let ns_ s =
s

Pconst_string changed type in OCaml 4.11

In ocaml/ocaml@abc53d1 Pconst_string added an extra Loc.t parameter. This breaks gettext.

The fix is quite simple - change all places where we have Pconst_string (something, _) to Pconst_string (something, _, _), and this is what I have done in the Fedora package. However this will of course break people using OCaml <= 4.10, and I don't know how to make it work for both.

Add gettext_noop

This feature request has been migrated from artifact #746 on forge.ocamlcore.org. It was assigned to user102.

user102 posted on 2010-09-09 16:55:38:

With short form: ns_ nf_.

This would simplify handling of static string in files. (e.g. list of data or funnction call during init).

Using gettext to extract OCaml and glade translateable strings

This bug has been migrated from artifact #423 on forge.ocamlcore.org. It was assigned to user102.

user102 posted on 2009-11-23 13:30:52:

We should patch gettext to manage strings extraction of OCaml files, so that we can benefit from all other source file string extraction.

Je vous recommande d'extraire d'une part un fichier .po en utilisant
ocaml-gettext et d'autre part les outils gettext pour extraire les
chaines du fichier .glade. Vous pouvez ensuite joindre les deux avec
msgmerge.

J'ai utilisé:
$ xgettext -j --language=Glade gui.glade
l'option -j ajoute les chaines de glade au messages.pot

Auto init

This feature request has been migrated from artifact #536 on forge.ocamlcore.org. It was assigned to user102.

user102 posted on 2010-03-06 16:08:28:

We should try to auto-init the library early, rather than relying on a call from main.

Because:

  • some strings are translated statically
  • there is no really well defined entry points (or main function) in OCaml

So the library should auto-init, using env variables and command line args. The current init with args should just ignore command line arguments, or check that they match previous ones. If no match between what has been used for auto-init and when calling init, just throw a warning telling every statically translated strings.

use of undocumented OCaml feature

This bug has been migrated from artifact #1269 on forge.ocamlcore.org. It was assigned to user100.

user320 posted on 2013-03-28 16:21:01:

At the end of gettextCharset.ml, we find this code:

module Dummy : CHARSET_TYPE =
struct
type encoding = string
type u = ()
let create t in_enc out_enc = ()
let recode () str = str
end
;;

This works, but only because OCaml accepts () as a constructor name in a concrete type definition (your type "u" is not equal to unit!). This is an undocumented feature that will probably be removed in a future version of OCaml, so I suggest that you change that line to "type u = unit", which is probably what you intended anyway.

Thanks -- Damien

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.