Author Topic: Missing lang.js  (Read 25801 times)

mholmes

  • Newbie
  • *
  • Posts: 6
    • View Profile
Missing lang.js
« on: November 13, 2008, 03:06:03 pm »
I have successfully installed on 000webhost.com using the myisam modifications.  Once I login as the administrator, I receive a missing lang.js error.  Any ideas how to resolve this?

Thanks!

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: Missing lang.js
« Reply #1 on: November 13, 2008, 04:19:08 pm »
What language are you using? What does the error message say exactly?

mholmes

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Missing lang.js
« Reply #2 on: November 13, 2008, 05:19:46 pm »
Sorry I am using English.  Every tab on the main page has missing lang.js  I have attached a screen shot.

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: Missing lang.js
« Reply #3 on: November 13, 2008, 05:44:51 pm »
There's a problem with you 'language/en_us/lang.js' file. Check if it's there to begin with. And also delete any other .js files in 'language/en_us'.

I'm attaching a clean version of the lang.js file.

mholmes

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Missing lang.js
« Reply #4 on: November 13, 2008, 05:50:12 pm »
I uploaded the file you posted and made sure there were no other js files in the en_us directory and still no luck.

digitalendemic

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: Missing lang.js
« Reply #5 on: November 14, 2008, 03:51:37 am »
Yeah I have the same problem on my install....any help would be very much appreciated...

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: Missing lang.js
« Reply #6 on: November 14, 2008, 09:08:18 am »
What do you see when you go to <your_opengoo>/index.php?c=access&a=get_javascript_translation

Thanks

mholmes

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Missing lang.js
« Reply #7 on: November 14, 2008, 11:28:56 am »
The text of the page is pasted below:

/* inicio */

/* ./language/en_us/lang.js */
try {locale = 'en_us';
addLangs({
   'check in': '<b>Check in</b>',
   'cannot check in': 'Cannot check in',
   'add as new revision to': 'Add as new revision to',
   'error loading content': 'Error loading content. Try again later.\nIf the problem persists contact the administrator.',
   'projects': 'Workspaces',
   'administration': 'Administration',
   'open link': 'Open Link',
   'open in new tab': 'Open In New Tab',
   'close tab': 'Close Tab',
   'close other tabs': 'Close Other Tabs',
   'loading': 'Loading...',
   'help': 'Help',
   'menu': 'Menu',
   'back': 'Back',
   'server could not be reached': 'Server could not be reached',
   'http error': 'Error {0}: {1}',
   'refesh desc': 'Refresh the view',
   'last updated by at': '{0}, at {1}',
   'last updated by on': '{0}, on {1}',
   'last updated by': 'Last updated by',
   'close this tag' : 'Close this tag',

   /* file manager */
   'by': 'by',
   'name': 'Name',
   'project': 'Workspace',
   'user': 'User',
   'tag': 'Tag',
   'type': 'Type',
   'tags': 'Tags',
   'last update': 'Last Update',
   'created on': 'Created on',
   'download': 'Download',
   'properties': 'Properties',
   'revisions and comments': 'Revisions & Coments',
   'slideshow': 'Slideshow',
   'add tag': 'Add Tag',
   'enter the desired tag': 'Enter the desired tag',
   'new': 'New',
   'create an object': 'Create an object',
   'document': 'Document',
   'spreadsheet': 'Spreadsheet',
   'presentation': 'Presentation',
   'upload': 'Upload',
   'upload a file': 'Upload a file',
   'tag selected objects': 'Tag selected objects',
   'delete': 'Delete',
   'delete selected objects': 'Delete selected objects',
   'confirm delete object': 'Are you sure you want to delete the selected object(s)?',
   'confirm delete contact': 'Are you sure you want to delete this contact?',
   'confirm delete company': 'Are you sure you want to delete this company?',
   'confirm delete event': 'Are you sure you want to permanenetly delete this event? \nAfter deleting an event other users won\'t be able to see it in their calendars'   ,
   'confirm delete file': 'Are you sure you want to delete this file?',
   'confirm delete mail content': 'Are you sure you want to delete this email?',
   'confirm delete mail account': 'Warning: All emails belonging to this account will be deleted as well, are you sure that you want to delete this mail account?',
    'confirm delete milestone': 'Are you sure you want to delete this milestone?',
   'confirm delete chart': 'Are you sure you want to delete this chart?',
   'confirm delete message': 'Are you sure you want to delete this note?',
   'confirm delete task list': 'Are you sure you want to delete this task list, along with its subtasks?',
   'confirm delete webpage': 'Are you sure you want to delete this weblink?',
   'confirm delete workspace': 'Are you sure you want to delete workspace \'{0}\'?',
   'confirm delete project': 'Are you sure that you want to delete this workspace and all related data (messages, tasks, milestones, files...)?',
   'confirm cancel work timeslot': 'Are you sure you want to cancel the current timeslot?',
   'more': 'More',
   'more actions': 'More actions',
   'more actions on first selected object': 'More actions on first selected object',
   'displaying files of': 'Displaying files {0} to {1} of {2}',
   'no files to display': 'No files to display',
   'no tasks to display': 'No tasks to display',
   'refresh desc': 'Refresh the view',
   'templates desc': 'Manage templates',
   'templates': 'Templates',
   'edit workspace': 'Edit the selected workspace',
   'company': 'Company',
   'companies': 'Companies',
   'email': 'E-mail',
   'checkin': 'Check in',
   'checkout': 'Check out',
   'checked out by': 'Checked out by {0}',
   'add file checked out by': '{0} was checked out by {1}',

   'song': 'Song',
   'artist': 'Artist',
   'album': 'Album',
   'year': 'Year',
   'playlist': 'Playlist',
   'playlists': 'Playlists',
   'unknown': 'Unkown',
   'previous': 'Previous',
   'play': 'Play',
   'pause': 'Pause',
   'stop': 'Stop',
   'next': 'Next',
   'mute': 'Mute',
   'unmute': 'Unmute',
   'load from current workspace': 'Load from current workspace',
   'load playlist from file': 'Load playlist from file',
   'save playlist to file': 'Save playlist to file',
   'clear playlist': 'Clear playlist',
   'remove selected from playlist': 'Remove selected from playlist',
   'shuffle playlist': 'Shuffle playlist',
   'toggle loop playlist': 'Toggle loop playlist',
   'play this file': 'Play this file',
   'queue': 'Queue',
   'queue this file': 'Queue this file in the player',
   'must choose a file': 'You must choose a file',
   'file has no valid songs': 'The file you chose has no valid songs',

   'error': 'Error',
   'success': 'Success',
   'unexpected server response': 'Unexpected server response',
   'new tab': 'New Tab',
   
   /* dashboard */
   'dashboard': 'Dashboard',
   'upload file': 'Upload a file',
   'contact': 'Contact',
   'event': 'Event',
   'task': 'Task',
   'milestone': 'Milestone',
   'refresh': 'Refresh',
   'author': 'Author',
   
   /* tabs */
   'overview': 'Overview',
   'messages': 'Notes',
   'contacts': 'Contacts',
   'calendar': 'Calendar',
   'tasks': 'Tasks',
   'web pages': 'Web Links',
   'documents': 'Documents',
   'account': 'Account',
   'administration': 'Administration',
   'search': 'Search',
   'webpage': 'Weblink',
   'message': 'Note',
   
   'workspaces': 'Workspaces',
   'all': 'All',
   'create a workspace': 'Create a new workspace',
   'delete selected workspace': 'Delete the selected workspace',
   
   /* object picker */
   'select an object': 'Select an object...',
   'filter': 'Filter',
   'all ws': 'All workspaces',
   'all type': 'All types',
   'all tag': 'All tags',
   'view': 'View',
   'details': 'Details',
   'icons': 'Icons',
   'displaying objects of': 'Displaying objects {0} to {1} of {2}',
   'no objects to display': 'No objects to display',
   'ok': 'OK',
   'cancel': 'Cancel',
   
   /* contact manager*/
   'company': 'Company',
   'email': 'Email',
   'add new contact': 'Add a new contact',
   'displaying contacts of': 'Displaying contacts {0} to {1} of {2}',
   'no contacts to display': 'No contacts to display',
   'delete selected contacts': 'Delete selected contacts',
   'confirm delete contacts': 'Are you sure you want to delete the selected contacts?',
   'role': 'Role',
   'tag selected contacts': 'Tag selected contacts',
   'department': 'Department',
   'email2': 'Email 2',
   'email3': 'Email 3',
   'workWebsite': 'Work website',
   'workAddress': 'Work address',
   'workPhone1': 'Work phone 1',
   'workPhone2': 'Work phone 2',
   'homeWebsite': 'Home website',
   'homeAddress': 'Home address',
   'homePhone1': 'Home phone 1',
   'homePhone2': 'Home phone 2',
   'mobilePhone': 'Mobile phone',
   'edit selected contact': 'Edit selected contact',
   'edit selected object': 'Edit selected object',
   'assign to project': 'Assign to workspace',
   'assign contact to project': 'Edit contact assignnments',
   
   /* webpage manager*/
   'description': 'Description',
   'title': 'Title',
   'add new webpage': 'Add a new web link',
   'displaying webpages of': 'Displaying web links {0} to {1} of {2}',
   'no webpages to display': 'No web links to display',
   'delete selected webpages': 'Delete selected web links',
   'confirm delete webpages': 'Are you sure you want to delete the selected web links?',
   'tag selected webpages': 'Tag selected web links',
   'edit': 'Edit',
   'edit selected webpage': 'Edit',
   
   /* message manager */
   'text':'Text',
   'date':'Date',
   'add mail account':'Add Email account',
   'classify':'Classify email',
   'add new message':'Add new note',
   'view by account': 'View by account',
   'view emails by account': 'View emails by account',
   'edit account': 'Edit account',
   'edit email account': 'Edit email account',
   'email actions': 'Email actions',
   'more email actions': 'More email actions',
   'view unclassified': 'View unclassified',
   'view unclassified emails': 'View unclassified emails',
   'all accounts': 'All accounts',
   'view all accounts': 'View all accounts',
   'hide messages': 'Hide notes',
   'show messages': 'Show notes',
   'view': 'View',
   'view all': 'View all',
   'all emails': 'All emails',
   'unclassified emails': 'Unclassified emails',
   'view options': 'View options',
   'check mails' : 'Check mail accounts',
   'emails' : 'Emails',
   'create an email' : 'Create an Email',

   'filter workspaces': 'Filter workspaces...',
   'filter tags': 'Filter tags...',
   'alphabetical': 'Alphabetical',
   'most active': 'Most active',
   'alphabetical desc': 'Sort in alphabetical order',
   'most active desc': 'Sort by most activity',
   'sort desc': 'Sort the view',
   
   'no objects message': 'There are no \'{0}\' in \'{1}\'',
   'no objects with tag message': 'There are no {0} tagged as \'{2}\' in \'{1}\'',
   'objects': 'Objects',
   
   'checkout description': 'Lock this file for editing',
   'undo checkout description': 'Make this file available',
   'checkin description': 'Check in new version of this file',
   
   'created by on': 'Created by {0} on {1}',
   
   /*  */
   'write' : 'Write',
   'write new mail' : 'Write E-Mail',
   'email': 'Email',
   'weblink': 'Web link',
   'webpage': 'Web link',
   'task': 'Task',
   'milestone': 'Milestone',
   'emailunclassified': 'Email',
   'file': 'File',
   'contact': 'Contact',
   'event': 'Event',
   
   'debug': 'Debug',
   'incomplete': 'Incomplete',
   'complete': 'Complete',
   'do complete': 'Complete',
   'late': 'Late',
   'status': 'Status',
   
   'open link in new window' : 'Open \'{0}\' in new window',
   
   'wschooser desc from': 'Available workspaces',
   'wschooser desc to': 'Object\'s workspaces',

   'updated by': 'Updated by',
   'created by': 'Created by',
   'view as dashboard': 'View as dashboard',
   /* Events*/
   'subject':'Subject',
   'add event':'Add Event',
   'next month':'Next Month',
   'prev month':'Previous Month',
   'today':'Today',
   'pick a date':'Pick a date',
   'month':'Month',
   'month view':'Month view',
   'week':'Week',
   'week view':'Week view',
   'day':'Day',
   'day view':'Daily view',
   'by state':'By state',
   'view pending response':'Pending response',
   'view will attend':'Will attend',
   'view will not attend':'Will not Attend',
   'view maybe attend':'Maybe',
   'by user':'By user',
   'add new event':'Add new Event',
   'prev':'Previous',
   'next':'Next',
   'my calendar': 'My Calendar',
   'edit event details': 'Edit event details',
   
   /* Charts */
   'reporting' : 'Reporting',
   'add new chart' : 'Add new chart',
   'delete selected charts' : 'Delete selected charts',
   'confirm delete charts' : 'Are you sure you want to delete the selected charts?',
   'edit selected chart' : 'Edit selected chart',
   'tag selected charts' : 'Tag the selected charts',
   'displaying charts of': 'Displaying charts {0} to {1} of {2}',
   'no charts to display' : 'There are no charts to display',
   'charts' : 'Charts',
   'unlock': 'In use',
   'lock': 'Available',
   'edit this document': 'Edit this document',
   
   /* tasks */
   'assigned to': 'Assigned to',
   'assign to': 'Assign to',
   'add subtask to': 'Add subtask to \'{0}\'',
   'add task to': 'Add task to \'{0}\'',
   'add task': 'Add task',
   'add milestone': 'Add milestone',
   'add new task': 'Add new task',
   'add new milestone': 'Add new milestone',
   'confirm delete task': 'Are you sure you want to delete this task and all of its subtasks?',
   'confirm delete milestone': 'Are you sure you want to delete this milestone?',
   'due date': 'Due date',
   'milestone delete tip': 'Delete this milestone',
   'milestone edit tip': 'Edit this milestone',
   'milestone check tip': 'Complete/open this milestone',
   'milestone expand tip': 'Show/hide this milestone\'s tasks',
   'milestone view tip': 'Milestone: {0} (Click to view more)',
   'task delete tip': 'Delete this task',
   'task edit tip': 'Edit this task',
   'task check tip': 'Complete/open this task',
   'task expand tip': 'Show/hide this task\'s subtasks',
   'task view tip': 'Task: {0} (Click to view more)',
   'task move down tip': 'Move task down one place',
   
   'new milestone': 'New milestone',
   'new task': 'New task',
   'error adding task': 'Error adding task',
   'error adding milestone': 'Error adding milestone',
   'error fetching tasks': 'Error fetching tasks',
   
   'confirm unload page': 'You have unsaved data. If you leave the page you will lose any unsaved data.',
   'confirm leave panel': 'You have unsaved data. If you proceed you will lose any unsaved data.\nProceed?',
   'unread emails': 'Unread emails',
   'mark read': 'Mark as read',
   'mark unread': 'Mark as unread',
   'from': 'From',
   'draft': 'Draft',
   'create contact or client company':'Create contact or client company',
   'mail sent': 'Mail sent',
   
   'click to remove': 'Click to remove',
   
   'confirm merge tags': 'Are you sure you want to merge tag \'{0}\' with tag \'{1}\'?\n(Once the tags are merged they can\'t be unmerged)',
   'save': 'Save',
   'choose a filename': 'Choose a filename',
   'rename tag': 'Rename tag',
   'enter a new name for the tag': 'Enter a new name for the tag',
   'duplicate company name':'<span style="color:#F00">A company with the name \'{0}\' already exists.&nbsp;</span><a href="#" style="text-decoration:underline" onclick="og.selectCompany(\'{1}\',{2})">Select this company</a>, or choose a different name',
   'inbox':'Inbox',
   'sent':'Sent',
   'unread': 'Unread',
   
   'more options': 'More options',
   'login': 'Login',
   'username': 'Username',
   'password': 'Password',
   'remember me': 'Remember me',
   'completed': 'Completed',
   'notify': 'Notify',
   'hours worked': 'Hours worked',
   
   'completed by': 'Completed by',
   'assigned by': 'Assigned by',
   'priority' : 'Priority',
   'unclassified': 'Unclassified',
   'ungrouped': 'Unclassified',
   'unassigned': 'Unassigned',
   'anyone': 'Anyone',
   'pending': 'Pending',
   'group by': 'Group by',
   'order by': 'Order by',
   'workspace':'Workspace',
   'start date': 'Start date',
   'task name': 'Task name',
   'show': 'Show',
   'time': 'Time',
   'dates': 'Dates',
   'select user or group': 'Select user or group',
   'select milestone': 'Select milestone',
   'select priority': 'Select priority',
   'low':'Low',
   'normal':'Normal',
   'high':'High',
   'me': 'Me',
   'complete selected tasks': 'Complete the selected tasks',
   'unclassified' : 'Unclassified',
   'earlier than one year': 'Earlier than 1 year',
   'last year' :'3 months to 1 year ago',
   'last three months' : '1 to 3 months ago',
   'last month' : '2 weeks to 1 month ago',
   'last two weeks' : '1 week to 2 weeks ago',
   'last week' : 'Yesterday to 1 week ago',
   'yesterday' : 'Yesterday',
   'today' : 'Today',
   'tomorrow' : 'Tomorrow',
   'one week' : 'In one week',
   'two weeks' : 'In two weeks',
   'one month' : 'In 2 weeks to 1 month',
   'three months' : 'In 1 to 3 months',
   'one year' : 'In 3 months to 1 year',
   'later than one year' : 'Later than one year',
   'start' : 'start',
   'due' : 'due',
   'add subtask': 'Add a new subtask',
   'completed by name on' : 'Completed by {0} on {1}',
   'completed by' : 'Completed by',
   'show more tasks number' : 'Show more ({0})...',
   'start_work': 'Start working on this task',
   'close_work': 'Stop working on this task',
   'time worked' : 'Time worked',
   'hours' : 'hours',
   'complete this task' : 'Complete this task',
   'reopen this task' : 'Reopen this task',
     'reopen' : 'Reopen',
   'assign': 'Assign',
   'assigning to' : 'Assigning to',
   'success add task' : 'Task added successfully',
   'invalid action' : 'Invalid action',
   'hide others' : 'Hide others',
   'hide other groups' : 'Hide other groups',
   'show all' : 'Show all',
   'show all groups' : 'Show all the groups',
   
   'send notification' : 'Send email notification',
   'all options': 'All options',
   'click to change workspace': 'Click to change workspace',
   
   'month 1': 'January',
    'month 2': 'February',
    'month 3': 'March',
    'month 4': 'April',
    'month 5': 'May',
    'month 6': 'June',
    'month 7': 'July',
    'month 8': 'August',
    'month 9': 'September',
    'month 10': 'October',
    'month 11': 'November',
    'month 12': 'December',
   
    'monday': 'Monday',
     'tuesday': 'Tuesday',
     'wednesday': 'Wednesday',
     'thursday': 'Thursday',
    'friday': 'Friday',
     'saturday': 'Saturday',
     'sunday': 'Sunday',
     'comment': 'Comment',
     
     'change user': 'Change user',
     'start work': 'Start work',
     'click to change workspace': 'Click to change workspace',
     'add a new task to this group': 'Add a new task to this group',
      'login dialog desc': 'Your session expired due to inactivity. Fill in this form to log back in.',
      'user not found' : 'User not found (id:{0})',
 
     'date format' : 'm/d/Y',
     'date format alternatives' : 'm/d/y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y',
     'warning start date greater than due date': 'Warning: the start date is later than the due date',
     
     'choose an image': 'Choose an image',
     'sort by': 'Sort by',
     'file size': 'File size',
     'last modified': 'Last modified',
     'image name': 'Image name',
     'size': 'Size',
     'completed on': 'Completed on'
});
} catch (e) {}
/* fin */

moplin

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Missing lang.js
« Reply #8 on: November 14, 2008, 12:09:02 pm »
Hi, I have the same problem (installed on eapps).

The result in this case is:

/* inicio */

/* fin */

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: Missing lang.js
« Reply #9 on: November 14, 2008, 02:00:52 pm »
Hi,

Add the following line to 'application/layouts/website.php' around line 10 (before the '<?php echo meta_tag...' line):
Code: [Select]
<?php echo add_javascript_to_page(with_slash(ROOT_URL) . 'language/' Localization::instance()->getLocale() . "/lang.js"?>
That should probably solve your problems, but even if it does I would like you to help me figure out what the underlying problem is.

Please change line 312 of 'application/controllers/AccessController.class.php' from:
Code: [Select]
$content .= "} catch (e) {}";to:
Code: [Select]
$content .= "} catch (e) { alert(e.message) }";and tell me if you get any messages when loading OpenGoo.

Thanks.
« Last Edit: November 15, 2008, 07:17:47 am by ignacio »

mholmes

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Missing lang.js
« Reply #10 on: November 14, 2008, 02:45:24 pm »
Even after making these changes, I still get the same error.

The pop-up message says" Missing lang.js: error illegal charachter click to remove

The screen appears the same as before.

{"events":[],"contents":{},"current":false,"errorCode":0,"errorMessage":"","notbar":false,"preventClose":false,"replace":false,"workspaces":[{"id":1,"name":"Administrator_personal","color":0,"parent":0,"realParent":0,"depth":1,"isPersonal":true}]}

digitalendemic

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: Missing lang.js
« Reply #11 on: November 14, 2008, 04:25:52 pm »
I've tried the updated info above and still am getting the missing lang.js error on everything.

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: Missing lang.js
« Reply #12 on: November 14, 2008, 05:32:55 pm »
This is weirder than I thought...

It is probably something related to encodings. What OS are you using?

Try editing file 'application/layouts/json.php' line 1 from:
Code: [Select]
<?php header('Content-type: text/javascript; charset=UTF-8'); ?>to:
Code: [Select]
<?php header('Content-type: text/javascript; charset=ISO-8859-1'); ?>
If that doesn't work, undo the change and edit file 'application/layouts/website.php' and insert this line at the beginning:
Code: [Select]
<?php header ("Content-Type: text/html; charset=utf8"true); ?>
And the last solution I can think of for the moment, use this new lang.js that I'm attaching (rename it to lang.js first). It is the same as the other lang.js but saved into a new file. Once it happened to us that a javascript file had some invisible characters at the beginning that were causing errors. We are not getting these errors with the lang.js from the release so probably it's not that, but let's try it anyways.

Please, try all of these solutions and tell me which worked (if any) and which not.

Thanks.

moplin

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Missing lang.js
« Reply #13 on: November 14, 2008, 07:43:29 pm »
Hi, I did the changes you requested. Still did not work, but I looked at the source code, to check the new echoed line, it pointed to “http://***.com/language/en_us/lang.js”. In that point I understood that I paced the application on the restricted area of the server and the public folder mapped to the internet.
That caused the application to miss the lang.js file. To make it visible, I copied the Languages folder inside the public folder, and erased the php files. Now it’s working fine.
Thank you

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: Missing lang.js
« Reply #14 on: November 15, 2008, 07:23:34 am »
The languages folder doesn't really need be accessible through your browser, it only needs to be readable by the unix user that runs apache (supposedly).

Anyway, to everyone: I just realized that the first solution I provided was commented (had a '//' at the beginning). I modified my post to remove the comment characters. Here it is again, now corrected:

Code: [Select]
<?php echo add_javascript_to_page(with_slash(ROOT_URL) . 'language/' Localization::instance()->getLocale() . "/lang.js"?>
As moplin noted, in order for this 'fix' to work, the languages folder has to be mapped to the internet.