7 Replies Latest reply on Sep 15, 2004 6:50 AM by Arnaud TESSIER

    Nukes language property file normalization

    Thomas Heute Master

      We have different "norms" in the different modules for keys in property files (due to the fact that some property files were taken from PHPNukes). We should agree on some kind of normalization. Unfortunately i couldn't find any recommendation to stick with so we have to agree on something by ourself.

      We already have 1 file per module and i think it's ok for everybody.
      We could subdivide that file into chunks into the file to be easier to read. Let's take the news module example, we have admin stuff and other stuff, we have things related to comments, topics and stories, so we could start the key name by specifying this 'domain'.
      Something like:
      Admin.Comments.DeleteStory <- for admin stuff
      Comment.Title <- for general stuff (admin and not)
      with points or with underscores
      Admin_Comments_EnterTitle
      Comment_Title

      Then we should decide on the way to name keys using upper/lowercase
      Admin_Comments_EnterTitle
      admin_comments_enterTitle
      ADMIN_COMMENTS_ENTERTITLE
      ADMIN.COMMENTS.ENTER_TITLE

      In the code each key is preceded by the name of the module and a '.' like this: ${news.Admin.Comments.EnterTitle}

      What are your thoughts ? any recommendation ? When this will be decided, i will try to make a little guide for module developers with norms we use (along with JBoss coding rules).

      Please comment on stuff above. I personally like {news.Admin.Comments.EnterTitle} better but i don't really care as long as we all choose the same notation.